@gramlot/gramlot 0.3.27 → 0.3.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/icons/chart.svg +1 -0
- package/dist/components/audio/__init__.py +13 -0
- package/dist/components/audio/assets/collection.js +3 -0
- package/dist/components/audio/assets/index.js +3 -0
- package/dist/components/audio/commands.json +7 -0
- package/dist/components/audio/grammar.json +335 -0
- package/dist/components/charts/__init__.py +13 -0
- package/dist/components/charts/assets/collection.js +47 -0
- package/dist/components/charts/assets/files/55ea01207028f76d844678511f29fc800f8a1e67a8a0fe80470128677847ad32-echarts-gl.txt +29 -0
- package/dist/components/charts/assets/files/63727832aaf62004a2b249c933e327f3c90caf49e41a72f4bf436edf632cbda8-vega.txt +27 -0
- package/dist/components/charts/assets/files/8c45d9eaf50c2f72dd9c7ab9ef440788ba58a3538484b5c51c1f17d5128752e7-plotly.txt +21 -0
- package/dist/components/charts/assets/files/8f989229699b4fe2f1a0432d0e9edc338a8a911e250e2d1b01ecd770a5f5b1bd-uplot.txt +21 -0
- package/dist/components/charts/assets/files/c8fa058cba98f7f288b5d8fa4116f441d6dacb25b96da859e518c973fff41d0c-claygl.txt +23 -0
- package/dist/components/charts/assets/index.js +3 -0
- package/dist/components/charts/assets/modules/chunk-2CCTLZE7.js +76 -0
- package/dist/components/charts/assets/modules/chunk-RMRBEYTI.js +1 -0
- package/dist/components/charts/assets/modules/echarts-gl-CXVTZA6G.js +4409 -0
- package/dist/components/charts/assets/modules/plotly.min-4LB7HE7P.js +3596 -0
- package/dist/components/charts/assets/modules/uPlot.esm-5JJNHHRF.js +3 -0
- package/dist/components/charts/assets/modules/uPlot.min-N3E3FA74.js +1 -0
- package/dist/components/charts/assets/modules/vega.module-2QCOVQ3A.js +13 -0
- package/dist/components/charts/commands.json +7 -0
- package/dist/components/charts/grammar.json +1113 -0
- package/dist/components/chat/__init__.py +1 -1
- package/dist/components/chat/assets/collection.js +3 -3
- package/dist/components/chat/assets/index.js +1 -1
- package/dist/components/drawing/__init__.py +15 -0
- package/dist/components/drawing/assets/collection.js +28 -0
- package/dist/components/drawing/assets/index.js +3 -0
- package/dist/components/drawing/commands.json +7 -0
- package/dist/components/drawing/grammar.json +110 -0
- package/dist/components/editors/__init__.py +2 -2
- package/dist/components/editors/assets/collection.js +18 -18
- package/dist/components/editors/assets/index.js +1 -1
- package/dist/components/editors/assets/modules/{prose-mirror-engine-GMZPJPNN.js → prose-mirror-engine-DQEAEIMV.js} +2 -2
- package/dist/components/editors/grammar.json +150 -0
- package/dist/components/grid/__init__.py +2 -2
- package/dist/components/grid/assets/collection.js +71 -34
- package/dist/components/grid/assets/files/0a1df3a083d0c010560aa342e87959c8c1070e6fd54545741f083f22d0c8b551-fflate.txt +21 -0
- package/dist/components/grid/assets/files/8cf9b31947daf7adb4a7a00a037459e58241af050cd0a603bfcf1756e533f75e-write-excel-file.txt +21 -0
- package/dist/components/grid/assets/index.js +1 -1
- package/dist/components/grid/assets/modules/browser-LVJHKBBV.js +19 -0
- package/dist/components/grid/assets/modules/chunk-RMRBEYTI.js +1 -0
- package/dist/components/grid/commands.json +42 -1
- package/dist/components/grid/grammar.json +650 -10
- package/dist/components/grouplets/__init__.py +1 -1
- package/dist/components/grouplets/assets/collection.js +3 -3
- package/dist/components/grouplets/assets/index.js +1 -1
- package/dist/components/inputs/__init__.py +3 -2
- package/dist/components/inputs/assets/collection.js +38 -23
- package/dist/components/inputs/assets/index.js +1 -1
- package/dist/components/inputs/grammar.json +1533 -321
- package/dist/components/layout/__init__.py +1 -1
- package/dist/components/layout/assets/collection.js +27 -23
- package/dist/components/layout/assets/index.js +1 -1
- package/dist/components/layout/grammar.json +85 -0
- package/dist/components/selection_trial/__init__.py +1 -1
- package/dist/components/selection_trial/assets/collection.js +3 -3
- package/dist/components/selection_trial/assets/index.js +1 -1
- package/dist/components/tree/__init__.py +1 -1
- package/dist/components/tree/assets/collection.js +11 -11
- package/dist/components/tree/assets/index.js +1 -1
- package/dist/components/tree/grammar.json +126 -0
- package/dist/components/typst/__init__.py +1 -1
- package/dist/components/typst/assets/collection.js +2 -2
- package/dist/components/typst/assets/index.js +1 -1
- package/dist/components/uploads/__init__.py +1 -1
- package/dist/components/uploads/assets/collection.js +8 -8
- package/dist/components/uploads/assets/index.js +1 -1
- package/dist/components/vizabi/__init__.py +13 -0
- package/dist/components/vizabi/assets/collection.js +22 -0
- package/dist/components/vizabi/assets/index.js +3 -0
- package/dist/components/vizabi/commands.json +7 -0
- package/dist/components/vizabi/grammar.json +128 -0
- package/dist/gramlot.js +944 -193
- package/dist/gramlot.min.js +85 -53
- package/dist/standard-collections.js +2 -0
- package/package.json +13 -4
- package/src/binding/grid-struct.js +5 -2
- package/src/binding/runtime.js +12 -1
- package/src/bootstrap.js +1 -1
- package/src/builder/gramlot-builder.d.ts +15 -2
- package/src/builder/gramlot-builder.js +116 -8
- package/src/builder/source.js +42 -1
- package/src/components/audio-analysis-session.js +65 -0
- package/src/components/audio.js +44 -0
- package/src/components/bases.js +6 -4
- package/src/components/border-container.js +6 -3
- package/src/components/buttons.js +47 -3
- package/src/components/chart-bar3d-options.js +30 -0
- package/src/components/chart-controls.js +83 -0
- package/src/components/chart-data-view.js +52 -0
- package/src/components/chart-data.js +42 -0
- package/src/components/chart-domains.js +46 -0
- package/src/components/chart-engines/echarts-options.js +50 -0
- package/src/components/chart-engines/echarts.js +82 -0
- package/src/components/chart-engines/index.js +22 -0
- package/src/components/chart-engines/plotly-map.js +34 -0
- package/src/components/chart-engines/plotly-spatial.js +35 -0
- package/src/components/chart-engines/plotly.js +138 -0
- package/src/components/chart-engines/uplot.js +57 -0
- package/src/components/chart-engines/vega.js +101 -0
- package/src/components/chart-fields.js +110 -0
- package/src/components/chart-geographic-options.js +47 -0
- package/src/components/chart-geojson.js +60 -0
- package/src/components/chart-geometry.js +11 -0
- package/src/components/chart-map-anchors.js +24 -0
- package/src/components/chart-map-bar3d-options.js +41 -0
- package/src/components/chart-map-data.js +25 -0
- package/src/components/chart-map-labels.js +8 -0
- package/src/components/chart-map-options.js +20 -0
- package/src/components/chart-pane.js +91 -0
- package/src/components/chart-renderer.js +58 -0
- package/src/components/chart-sample-view.js +32 -0
- package/src/components/chart-spatial-options.js +40 -0
- package/src/components/chart-time.js +84 -0
- package/src/components/chart-timeline.js +70 -0
- package/src/components/chart-types/area.js +2 -0
- package/src/components/chart-types/bar.js +2 -0
- package/src/components/chart-types/bar3D.js +2 -0
- package/src/components/chart-types/donut.js +2 -0
- package/src/components/chart-types/horizontalBar.js +2 -0
- package/src/components/chart-types/index.js +26 -0
- package/src/components/chart-types/line.js +2 -0
- package/src/components/chart-types/line3D.js +2 -0
- package/src/components/chart-types/lines3D.js +2 -0
- package/src/components/chart-types/map.js +2 -0
- package/src/components/chart-types/map3D.js +2 -0
- package/src/components/chart-types/mapBar3D.js +2 -0
- package/src/components/chart-types/pie.js +2 -0
- package/src/components/chart-types/polygons3D.js +2 -0
- package/src/components/chart-types/scatter.js +2 -0
- package/src/components/chart-types/scatter3D.js +2 -0
- package/src/components/chart-types/stackedArea.js +2 -0
- package/src/components/chart-types/stackedBar.js +2 -0
- package/src/components/chart-types/surface.js +2 -0
- package/src/components/charts.js +152 -0
- package/src/components/check-box-text-editor.js +88 -0
- package/src/components/check-box-text.js +193 -0
- package/src/components/check-box-tree.js +62 -0
- package/src/components/choice-editor.js +7 -5
- package/src/components/choice-field-styles.js +14 -0
- package/src/components/choices.js +5 -0
- package/src/components/drawing.js +199 -0
- package/src/components/grid-check-sets.js +98 -0
- package/src/components/grid-column-filters.js +198 -0
- package/src/components/grid-footer.js +120 -0
- package/src/components/grid-formulas.js +403 -0
- package/src/components/grid-grammar.json +131 -2
- package/src/components/grid-header-interaction.js +3 -1
- package/src/components/grid-rows.js +2 -2
- package/src/components/grid-search-box.js +38 -22
- package/src/components/grid-search-styles.js +13 -14
- package/src/components/grid-search.js +8 -1
- package/src/components/grid-selection.js +118 -0
- package/src/components/grid-structure.js +36 -5
- package/src/components/grid-styles.js +37 -1
- package/src/components/grid-tools.js +229 -0
- package/src/components/grid.js +223 -15
- package/src/components/image-uploader.js +2 -2
- package/src/components/inputs.js +19 -10
- package/src/components/labelbox.js +5 -1
- package/src/components/licenses/claygl.txt +23 -0
- package/src/components/licenses/echarts-gl.txt +29 -0
- package/src/components/licenses/fflate.txt +21 -0
- package/src/components/licenses/plotly.txt +21 -0
- package/src/components/licenses/uplot.txt +21 -0
- package/src/components/licenses/vega.txt +27 -0
- package/src/components/licenses/write-excel-file.txt +21 -0
- package/src/components/menus.js +19 -11
- package/src/components/toolbar-overflow.js +12 -8
- package/src/components/tree.js +30 -8
- package/src/components/typed-editor.js +14 -3
- package/src/components/vizabi-session.js +66 -0
- package/src/components/vizabi.js +66 -0
- package/src/components/window-surface.js +20 -9
- package/src/components/windows.js +1 -1
- package/src/editing-session.d.ts +2 -0
- package/src/editing-session.js +35 -3
- package/src/gramlot.d.ts +1 -0
- package/src/gramlot.js +2 -0
- package/src/handlers/device-handler.js +32 -32
- package/src/handlers/source-handler.d.ts +2 -2
- package/src/ide-documents.js +19 -3
- package/src/ide-runtime.d.ts +1 -0
- package/src/ide-runtime.js +45 -31
- package/src/index.d.ts +1 -0
- package/src/renderer/drag-drop.js +1 -0
- package/src/renderer/gramlot-renderer.d.ts +2 -0
- package/src/renderer/gramlot-renderer.js +5 -4
- package/src/server/assets.d.ts +3 -0
- package/src/server/assets.js +9 -0
- package/src/server/gramlot-server.d.ts +1 -1
- package/src/server/gramlot-server.js +2 -1
- package/src/server/index.d.ts +1 -1
- package/src/server/index.js +1 -1
- package/src/server/visual-editor.js +17 -17
- package/src/stores/bag-collection-store.js +14 -5
- package/src/stores/bag-collection-view.js +80 -18
- package/src/stores/collection-filter.js +2 -1
- package/src/stores/column-filter.js +49 -0
- package/src/stores/id-set.js +10 -0
- package/src/view/controls.js +8 -0
- package/src/view/html.js +10 -1
- package/src/view/label-menu.js +61 -0
- package/src/view/labelbox.js +15 -2
- package/themes/gramlot-base/theme.css +6 -0
- package/tools/gramlot-tools-inspector.js +169 -505
|
@@ -1,33 +1,37 @@
|
|
|
1
|
-
var cl=Object.create;var Zn=Object.defineProperty;var dl=Object.getOwnPropertyDescriptor;var fl=Object.getOwnPropertyNames;var pl=Object.getPrototypeOf,hl=Object.prototype.hasOwnProperty;var Ke=(r,e)=>()=>{try{return e||r((e={exports:{}}).exports,e),e.exports}catch(t){throw e=0,t}},hi=(r,e)=>{for(var t in e)Zn(r,t,{get:e[t],enumerable:!0})},Yn=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of fl(e))!hl.call(r,a)&&a!==t&&Zn(r,a,{get:()=>e[a],enumerable:!(n=dl(e,a))||n.enumerable});return r},Hr=(r,e,t)=>(Yn(r,e,"default"),t&&Yn(t,e,"default")),mi=(r,e,t)=>(t=r!=null?cl(pl(r)):{},Yn(e||!r||!r.__esModule?Zn(t,"default",{value:r,enumerable:!0}):t,r));var wt=Ke(ce=>{"use strict";function Fu(r,e,t){if(t===void 0&&(t=Array.prototype),r&&typeof t.find=="function")return t.find.call(r,e);for(var n=0;n<r.length;n++)if(_t(r,n)){var a=r[n];if(e.call(void 0,a,n,r))return a}}function Ot(r,e){return e===void 0&&(e=Object),e&&typeof e.getOwnPropertyDescriptors=="function"&&(r=e.create(null,e.getOwnPropertyDescriptors(r))),e&&typeof e.freeze=="function"?e.freeze(r):r}function _t(r,e){return Object.prototype.hasOwnProperty.call(r,e)}function Uu(r,e){if(r===null||typeof r!="object")throw new TypeError("target is not an object");for(var t in e)_t(e,t)&&(r[t]=e[t]);return r}var Ki=Ot({allowfullscreen:!0,async:!0,autofocus:!0,autoplay:!0,checked:!0,controls:!0,default:!0,defer:!0,disabled:!0,formnovalidate:!0,hidden:!0,ismap:!0,itemscope:!0,loop:!0,multiple:!0,muted:!0,nomodule:!0,novalidate:!0,open:!0,playsinline:!0,readonly:!0,required:!0,reversed:!0,selected:!0});function qu(r){return _t(Ki,r.toLowerCase())}var Qi=Ot({area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ju(r){return _t(Qi,r.toLowerCase())}var cr=Ot({script:!1,style:!1,textarea:!0,title:!0});function zu(r){var e=r.toLowerCase();return _t(cr,e)&&!cr[e]}function Vu(r){var e=r.toLowerCase();return _t(cr,e)&&cr[e]}function es(r){return r===dr.HTML}function Hu(r){return es(r)||r===dr.XML_XHTML_APPLICATION}var dr=Ot({HTML:"text/html",XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),Wu=Object.keys(dr).map(function(r){return dr[r]});function Gu(r){return Wu.indexOf(r)>-1}var Xu=Ot({HTML:"http://www.w3.org/1999/xhtml",SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});ce.assign=Uu;ce.find=Fu;ce.freeze=Ot;ce.HTML_BOOLEAN_ATTRIBUTES=Ki;ce.HTML_RAW_TEXT_ELEMENTS=cr;ce.HTML_VOID_ELEMENTS=Qi;ce.hasDefaultHTMLNamespace=Hu;ce.hasOwn=_t;ce.isHTMLBooleanAttribute=qu;ce.isHTMLRawTextElement=zu;ce.isHTMLEscapableRawTextElement=Vu;ce.isHTMLMimeType=es;ce.isHTMLVoidElement=ju;ce.isValidMimeType=Gu;ce.MIME_TYPE=dr;ce.NAMESPACE=Xu});var gr=Ke(mr=>{"use strict";var Yu=wt();function rs(r,e){r.prototype=Object.create(Error.prototype,{constructor:{value:r},name:{value:r.name,enumerable:!0,writable:e}})}var pr=Yu.freeze({Error:"Error",IndexSizeError:"IndexSizeError",DomstringSizeError:"DomstringSizeError",HierarchyRequestError:"HierarchyRequestError",WrongDocumentError:"WrongDocumentError",InvalidCharacterError:"InvalidCharacterError",NoDataAllowedError:"NoDataAllowedError",NoModificationAllowedError:"NoModificationAllowedError",NotFoundError:"NotFoundError",NotSupportedError:"NotSupportedError",InUseAttributeError:"InUseAttributeError",InvalidStateError:"InvalidStateError",SyntaxError:"SyntaxError",InvalidModificationError:"InvalidModificationError",NamespaceError:"NamespaceError",InvalidAccessError:"InvalidAccessError",ValidationError:"ValidationError",TypeMismatchError:"TypeMismatchError",SecurityError:"SecurityError",NetworkError:"NetworkError",AbortError:"AbortError",URLMismatchError:"URLMismatchError",QuotaExceededError:"QuotaExceededError",TimeoutError:"TimeoutError",InvalidNodeTypeError:"InvalidNodeTypeError",DataCloneError:"DataCloneError",EncodingError:"EncodingError",NotReadableError:"NotReadableError",UnknownError:"UnknownError",ConstraintError:"ConstraintError",DataError:"DataError",TransactionInactiveError:"TransactionInactiveError",ReadOnlyError:"ReadOnlyError",VersionError:"VersionError",OperationError:"OperationError",NotAllowedError:"NotAllowedError",OptOutError:"OptOutError"}),ns=Object.keys(pr);function as(r){return typeof r=="number"&&r>=1&&r<=25}function Zu(r){return typeof r=="string"&&r.substring(r.length-pr.Error.length)===pr.Error}function hr(r,e){as(r)?(this.name=ns[r],this.message=e||""):(this.message=r,this.name=Zu(e)?e:pr.Error),Error.captureStackTrace&&Error.captureStackTrace(this,hr)}rs(hr,!0);Object.defineProperties(hr.prototype,{code:{enumerable:!0,get:function(){var r=ns.indexOf(this.name);return as(r)?r:0}}});var is={INDEX_SIZE_ERR:1,DOMSTRING_SIZE_ERR:2,HIERARCHY_REQUEST_ERR:3,WRONG_DOCUMENT_ERR:4,INVALID_CHARACTER_ERR:5,NO_DATA_ALLOWED_ERR:6,NO_MODIFICATION_ALLOWED_ERR:7,NOT_FOUND_ERR:8,NOT_SUPPORTED_ERR:9,INUSE_ATTRIBUTE_ERR:10,INVALID_STATE_ERR:11,SYNTAX_ERR:12,INVALID_MODIFICATION_ERR:13,NAMESPACE_ERR:14,INVALID_ACCESS_ERR:15,VALIDATION_ERR:16,TYPE_MISMATCH_ERR:17,SECURITY_ERR:18,NETWORK_ERR:19,ABORT_ERR:20,URL_MISMATCH_ERR:21,QUOTA_EXCEEDED_ERR:22,TIMEOUT_ERR:23,INVALID_NODE_TYPE_ERR:24,DATA_CLONE_ERR:25},ba=Object.entries(is);for(fr=0;fr<ba.length;fr++)ts=ba[fr][0],hr[ts]=ba[fr][1];var ts,fr;function _a(r,e,t){this.message=r,this.locator=e,this.cause=t,Error.captureStackTrace&&Error.captureStackTrace(this,_a)}rs(_a);mr.DOMException=hr;mr.DOMExceptionName=pr;mr.ExceptionCode=is;mr.ParseError=_a});var Aa=Ke(S=>{"use strict";function ds(r){try{typeof r!="function"&&(r=RegExp);var e=new r("\u{1D306}","u").exec("\u{1D306}");return!!e&&e[0].length===2}catch{}return!1}var Lt=ds();function it(r){if(r.source[0]!=="[")throw new Error(r+" can not be used with chars");return r.source.slice(1,r.source.lastIndexOf("]"))}function Mt(r,e){if(r.source[0]!=="[")throw new Error("/"+r.source+"/ can not be used with chars_without");if(!e||typeof e!="string")throw new Error(JSON.stringify(e)+" is not a valid search");if(r.source.indexOf(e)===-1)throw new Error('"'+e+'" is not is /'+r.source+"/");if(e==="-"&&r.source.indexOf(e)!==1)throw new Error('"'+e+'" is not at the first postion of /'+r.source+"/");return new RegExp(r.source.replace(e,""),Lt?"u":"")}function O(r){var e=this;return new RegExp(Array.prototype.slice.call(arguments).map(function(t){var n=typeof t=="string";if(n&&e===void 0&&t==="|")throw new Error("use regg instead of reg to wrap expressions with `|`!");return n?t:t.source}).join(""),Lt?"u":"")}function C(r){if(arguments.length===0)throw new Error("no parameters provided");return O.apply(C,["(?:"].concat(Array.prototype.slice.call(arguments),[")"]))}var Ju="\uFFFD",st=/[-\x09\x0A\x0D\x20-\x2C\x2E-\uD7FF\uE000-\uFFFD]/;Lt&&(st=O("[",it(st),"\\u{10000}-\\u{10FFFF}","]"));var Ku=new RegExp("[^"+it(st)+"]",Lt?"u":""),dn=/[\x20\x09\x0D\x0A]/,Qu=it(dn),j=O(dn,"+"),G=O(dn,"*"),br=/[:_a-zA-Z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/;Lt&&(br=O("[",it(br),"\\u{10000}-\\u{10FFFF}","]"));var ec=it(br),va=O("[",ec,it(/[-.0-9\xB7]/),it(/[\u0300-\u036F\u203F-\u2040]/),"]"),xe=O(br,va,"*"),tc=O("^",xe,"$"),ss=O(va,"+"),rc=O("&",xe,";"),nc=C(/&#[0-9]+;|&#x[0-9a-fA-F]+;/),_r=C(rc,"|",nc),wr=O("%",xe,";"),xa=C(O('"',C(/[^%&"]/,"|",wr,"|",_r),"*",'"'),"|",O("'",C(/[^%&']/,"|",wr,"|",_r),"*","'")),ac=C('"',C(/[^<&"]/,"|",_r),"*",'"',"|","'",C(/[^<&']/,"|",_r),"*","'"),ic=Mt(br,":"),sc=Mt(va,":"),wa=O(ic,sc,"*"),oc=O("^",wa,"$"),yr=O(wa,C(":",wa),"?"),lc=O("^",yr,"$"),uc=O("(",yr,")"),Rt=C(/"[^"]*"|'[^']*'/),cc=O(/^<\?/,"(",xe,")",C(j,"(?!",dn,")(",st,"*?)"),"?",/\?>/),os=/[\x20\x0D\x0Aa-zA-Z0-9-'()+,./:=?;!*#@$_%]/,vr=C('"',os,'*"',"|","'",Mt(os,"'"),"*'"),fs="<!--",ps="-->",dc=O(fs,C(Mt(st,"-"),"|",O("-",Mt(st,"-"))),"*",ps),ls="#PCDATA",fc=C(O(/\(/,G,ls,C(G,/\|/,G,yr),"*",G,/\)\*/),"|",O(/\(/,G,ls,G,/\)/)),pc=/[?*+]?/,hc=O(/\([^>]+\)/,pc),mc=C("EMPTY","|","ANY","|",fc,"|",hc),gc="<!ELEMENT",bc=O(gc,j,C(yr,"|",wr),j,C(mc,"|",wr),G,">"),_c=O("NOTATION",j,/\(/,G,xe,C(G,/\|/,G,xe),"*",G,/\)/),wc=O(/\(/,G,ss,C(G,/\|/,G,ss),"*",G,/\)/),yc=C(_c,"|",wc),vc=C(/CDATA|ID|IDREF|IDREFS|ENTITY|ENTITIES|NMTOKEN|NMTOKENS/,"|",yc),xc=C(/#REQUIRED|#IMPLIED/,"|",C(C("#FIXED",j),"?",ac)),Ec=C(j,xe,j,vc,j,xc),kc="<!ATTLIST",Ac=O(kc,j,xe,Ec,"*",G,">"),ya="about:legacy-compat",Dc=C('"'+ya+'"',"|","'"+ya+"'"),Ea="SYSTEM",fn="PUBLIC",pn=C(C(Ea,j,Rt),"|",C(fn,j,vr,j,Rt)),Tc=O("^",C(C(Ea,j,"(?<SystemLiteralOnly>",Rt,")"),"|",C(fn,j,"(?<PubidLiteral>",vr,")",j,"(?<SystemLiteral>",Rt,")"))),Cc=O("^",vr,"$"),Nc=O("^",Rt,"$"),Sc=C(j,"NDATA",j,xe),Ic=C(xa,"|",C(pn,Sc,"?")),hs="<!ENTITY",Bc=O(hs,j,xe,j,Ic,G,">"),Oc=C(xa,"|",pn),Mc=O(hs,j,"%",j,xe,j,Oc,G,">"),Rc=C(Bc,"|",Mc),Lc=O(fn,j,vr),Pc=O("<!NOTATION",j,xe,j,C(pn,"|",Lc),G,">"),ka=O(G,"=",G),us=/1[.]\d+/,$c=O(j,"version",ka,C("'",us,"'","|",'"',us,'"')),cs=/[A-Za-z][-A-Za-z0-9._]*/,Fc=C(j,"encoding",ka,C('"',cs,'"',"|","'",cs,"'")),Uc=C(j,"standalone",ka,C("'",C("yes","|","no"),"'","|",'"',C("yes","|","no"),'"')),qc=O(/^<\?xml/,$c,Fc,"?",Uc,"?",G,/\?>/),jc="<!DOCTYPE",zc="<![CDATA[",Vc="]]>",Hc=/<!\[CDATA\[/,Wc=/\]\]>/,Gc=O(st,"*?",Wc),Xc=O(Hc,Gc);S.chars=it;S.chars_without=Mt;S.detectUnicodeSupport=ds;S.reg=O;S.regg=C;S.ABOUT_LEGACY_COMPAT=ya;S.ABOUT_LEGACY_COMPAT_SystemLiteral=Dc;S.AttlistDecl=Ac;S.CDATA_START=zc;S.CDATA_END=Vc;S.CDSect=Xc;S.Char=st;S.Comment=dc;S.COMMENT_START=fs;S.COMMENT_END=ps;S.DOCTYPE_DECL_START=jc;S.elementdecl=bc;S.EntityDecl=Rc;S.EntityValue=xa;S.ExternalID=pn;S.ExternalID_match=Tc;S.Name=xe;S.Name_exact=tc;S.NCName_exact=oc;S.NotationDecl=Pc;S.Reference=_r;S.PEReference=wr;S.PI=cc;S.PUBLIC=fn;S.PubidLiteral=vr;S.PubidLiteral_match=Cc;S.QName=yr;S.QName_exact=lc;S.QName_group=uc;S.S=j;S.SChar_s=Qu;S.S_OPT=G;S.SYSTEM=Ea;S.SystemLiteral=Rt;S.SystemLiteral_match=Nc;S.InvalidChar=Ku;S.UNICODE_REPLACEMENT_CHARACTER=Ju;S.UNICODE_SUPPORT=Lt;S.XMLDecl=qc});var Ra=Ke(Z=>{"use strict";var De=wt(),Pe=De.find,Yc=De.hasDefaultHTMLNamespace,$t=De.hasOwn,Zc=De.isHTMLMimeType,Jc=De.isHTMLRawTextElement,Kc=De.isHTMLVoidElement,xr=De.MIME_TYPE,$e=De.NAMESPACE,ge=Symbol(),vs=gr(),x=vs.DOMException,he=vs.DOMExceptionName,Y=Aa();function _e(r){if(r!==ge)throw new TypeError("Illegal constructor")}function Qc(r){return r!==""}function ed(r){return r?r.split(/[\t\n\f\r ]+/).filter(Qc):[]}function td(r,e){return $t(r,e)||(r[e]=!0),r}function ms(r){if(!r)return[];var e=ed(r);return Object.keys(e.reduce(td,{}))}function rd(r){return function(e){return r&&r.indexOf(e)!==-1}}function xs(r){if(!Y.QName_exact.test(r))throw new x(x.INVALID_CHARACTER_ERR,'invalid character in qualified name "'+r+'"')}function Ta(r,e){xs(e),r=r||null;var t=null,n=e;if(e.indexOf(":")>=0){var a=e.split(":");t=a[0],n=a[1]}if(t!==null&&r===null)throw new x(x.NAMESPACE_ERR,"prefix is non-null and namespace is null");if(t==="xml"&&r!==De.NAMESPACE.XML)throw new x(x.NAMESPACE_ERR,'prefix is "xml" and namespace is not the XML namespace');if((t==="xmlns"||e==="xmlns")&&r!==De.NAMESPACE.XMLNS)throw new x(x.NAMESPACE_ERR,'either qualifiedName or prefix is "xmlns" and namespace is not the XMLNS namespace');if(r===De.NAMESPACE.XMLNS&&t!=="xmlns"&&e!=="xmlns")throw new x(x.NAMESPACE_ERR,'namespace is the XMLNS namespace and neither qualifiedName nor prefix is "xmlns"');return[r,t,n]}function qt(r,e){for(var t in r)$t(r,t)&&(e[t]=r[t])}function we(r,e){var t=r.prototype;if(!(t instanceof e)){let n=function(){};n.prototype=e.prototype,n=new n,qt(t,n),r.prototype=t=n}t.constructor!=r&&(typeof r!="function"&&console.error("unknown Class:"+r),t.constructor=r)}var ye={},Ae=ye.ELEMENT_NODE=1,Ft=ye.ATTRIBUTE_NODE=2,Er=ye.TEXT_NODE=3,Es=ye.CDATA_SECTION_NODE=4,ks=ye.ENTITY_REFERENCE_NODE=5,nd=ye.ENTITY_NODE=6,Ca=ye.PROCESSING_INSTRUCTION_NODE=7,Na=ye.COMMENT_NODE=8,Pt=ye.DOCUMENT_NODE=9,As=ye.DOCUMENT_TYPE_NODE=10,ot=ye.DOCUMENT_FRAGMENT_NODE=11,ad=ye.NOTATION_NODE=12,X=De.freeze({DOCUMENT_POSITION_DISCONNECTED:1,DOCUMENT_POSITION_PRECEDING:2,DOCUMENT_POSITION_FOLLOWING:4,DOCUMENT_POSITION_CONTAINS:8,DOCUMENT_POSITION_CONTAINED_BY:16,DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:32});function Ds(r,e){if(e.length<r.length)return Ds(e,r);var t=null;for(var n in r){if(r[n]!==e[n])return t;t=r[n]}return t}function gs(r){return r.guid||(r.guid=Math.random()),r.guid}function ne(){}ne.prototype={length:0,item:function(r){return r>=0&&r<this.length?this[r]:null},toString:function(r){var e;typeof r=="function"?e={requireWellFormed:!1,splitCDATASections:!0,nodeFilter:r}:r?e={requireWellFormed:!!r.requireWellFormed,splitCDATASections:r.splitCDATASections!==!1,nodeFilter:r.nodeFilter||null}:e={requireWellFormed:!1,splitCDATASections:!0,nodeFilter:null};for(var t=[],n=0;n<this.length;n++)Ma(this[n],t,null,e);return t.join("")},filter:function(r){return Array.prototype.filter.call(this,r)},indexOf:function(r){return Array.prototype.indexOf.call(this,r)}};ne.prototype[Symbol.iterator]=function(){var r=this,e=0;return{next:function(){return e<r.length?{value:r[e++],done:!1}:{done:!0}},return:function(){return{done:!0}}}};function Le(r,e){this._node=r,this._refresh=e,bn(this)}function bn(r){var e=r._node._inc||r._node.ownerDocument._inc;if(r._inc!==e){var t=r._refresh(r._node);if(Ps(r,"length",t.length),!r.$$length||t.length<r.$$length)for(var n=t.length;n in r;n++)$t(r,n)&&delete r[n];qt(t,r),r._inc=e}}Le.prototype.item=function(r){return bn(this),this[r]||null};we(Le,ne);function Ut(){this._nsIndex=Object.create(null),this._noNsIndex=Object.create(null)}function Ts(r,e){for(var t=0;t<r.length;){if(r[t]===e)return t;t++}}function Sa(r,e,t){if(!e)return r._noNsIndex;var n=r._nsIndex[e];return!n&&t&&(n=r._nsIndex[e]=Object.create(null)),n}function id(r,e,t){var n=Sa(r,e,!1),a=n&&n[t];return a||null}function sd(r,e){Sa(r,e.namespaceURI,!0)[e.localName]=e}function od(r,e){var t=Sa(r,e.namespaceURI,!1);t&&delete t[e.localName]}function ld(r,e,t,n){if(n?e[Ts(e,n)]=t:(e[e.length]=t,e.length++),sd(e,t),r){t.ownerElement=r;var a=r.ownerDocument;a&&(n&&Ss(a,r,n),ud(a,r,t))}}function bs(r,e,t){var n=Ts(e,t);if(n>=0){for(var a=e.length-1;n<=a;)e[n]=e[++n];if(e.length=a,od(e,t),r){var i=r.ownerDocument;i&&Ss(i,r,t),t.ownerElement=null}}}Ut.prototype={length:0,item:ne.prototype.item,getNamedItem:function(r){this._ownerElement&&this._ownerElement._isInHTMLDocumentAndNamespace()&&(r=r.toLowerCase());for(var e=0;e<this.length;){var t=this[e];if(t.nodeName===r)return t;e++}return null},setNamedItem:function(r){var e=r.ownerElement;if(e&&e!==this._ownerElement)throw new x(x.INUSE_ATTRIBUTE_ERR);var t=id(this,r.namespaceURI,r.localName);return t===r?r:(ld(this._ownerElement,this,r,t),t)},setNamedItemNS:function(r){return this.setNamedItem(r)},removeNamedItem:function(r){var e=this.getNamedItem(r);if(!e)throw new x(x.NOT_FOUND_ERR,r);return bs(this._ownerElement,this,e),e},removeNamedItemNS:function(r,e){var t=this.getNamedItemNS(r,e);if(!t)throw new x(x.NOT_FOUND_ERR,r?r+" : "+e:e);return bs(this._ownerElement,this,t),t},getNamedItemNS:function(r,e){r||(r=null);for(var t=0;t<this.length;){var n=this[t];if(n.localName===e&&n.namespaceURI===r)return n;t++}return null}};Ut.prototype[Symbol.iterator]=function(){var r=this,e=0;return{next:function(){return e<r.length?{value:r[e++],done:!1}:{done:!0}},return:function(){return{done:!0}}}};function Cs(){}Cs.prototype={hasFeature:function(r,e){return!0},createDocument:function(r,e,t){var n=xr.XML_APPLICATION;r===$e.HTML?n=xr.XML_XHTML_APPLICATION:r===$e.SVG&&(n=xr.XML_SVG_IMAGE);var a=new He(ge,{contentType:n});if(a.implementation=this,a.childNodes=new ne,a.doctype=t||null,t&&a.appendChild(t),e){var i=a.createElementNS(r,e);a.appendChild(i)}return a},createDocumentType:function(r,e,t,n){xs(r);var a=new yn(ge);return a.name=r,a.nodeName=r,a.publicId=e||"",a.systemId=t||"",a.internalSubset=n||"",a.childNodes=new ne,a},createHTMLDocument:function(r){var e=new He(ge,{contentType:xr.HTML});if(e.implementation=this,e.childNodes=new ne,r!==!1){e.doctype=this.createDocumentType("html"),e.doctype.ownerDocument=e,e.appendChild(e.doctype);var t=e.createElement("html");e.appendChild(t);var n=e.createElement("head");if(t.appendChild(n),typeof r=="string"){var a=e.createElement("title");a.appendChild(e.createTextNode(r)),n.appendChild(a)}t.appendChild(e.createElement("body"))}return e}};function L(r){_e(r)}L.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,parentNode:null,get parentElement(){return this.parentNode&&this.parentNode.nodeType===this.ELEMENT_NODE?this.parentNode:null},childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,baseURI:"about:blank",get isConnected(){var r=this.getRootNode();return r&&r.nodeType===r.DOCUMENT_NODE},contains:function(r){if(!r)return!1;var e=r;do{if(this===e)return!0;e=e.parentNode}while(e);return!1},getRootNode:function(r){var e=this;do{if(!e.parentNode)return e;e=e.parentNode}while(e)},isEqualNode:function(r){if(!r)return!1;for(var e=[{node:this,other:r}];e.length>0;){var t=e.pop(),n=t.node,a=t.other;if(n.nodeType!==a.nodeType)return!1;switch(n.nodeType){case n.DOCUMENT_TYPE_NODE:if(n.name!==a.name||n.publicId!==a.publicId||n.systemId!==a.systemId)return!1;break;case n.ELEMENT_NODE:if(n.namespaceURI!==a.namespaceURI||n.prefix!==a.prefix||n.localName!==a.localName||n.attributes.length!==a.attributes.length)return!1;for(var i=0;i<n.attributes.length;i++){var s=n.attributes.item(i),o=a.getAttributeNodeNS(s.namespaceURI,s.localName);if(!o)return!1;e.push({node:s,other:o})}break;case n.ATTRIBUTE_NODE:if(n.namespaceURI!==a.namespaceURI||n.localName!==a.localName||n.value!==a.value)return!1;break;case n.PROCESSING_INSTRUCTION_NODE:if(n.target!==a.target||n.data!==a.data)return!1;break;case n.TEXT_NODE:case n.CDATA_SECTION_NODE:case n.COMMENT_NODE:if(n.data!==a.data)return!1;break}if(n.childNodes.length!==a.childNodes.length)return!1;for(var i=n.childNodes.length-1;i>=0;i--)e.push({node:n.childNodes[i],other:a.childNodes[i]})}return!0},isSameNode:function(r){return this===r},insertBefore:function(r,e){return gn(this,r,e)},replaceChild:function(r,e){gn(this,r,e,Os),e&&this.removeChild(e)},removeChild:function(r){return Is(this,r)},appendChild:function(r){return this.insertBefore(r,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(r){return Ls(this.ownerDocument||this,this,r)},normalize:function(){de(this,null,{enter:function(r){for(var e=r.firstChild;e;){var t=e.nextSibling;if(t!==null&&t.nodeType===Er&&e.nodeType===Er){for(var n=[],a=t;a!==null&&a.nodeType===Er;)n.push(a.data),a=a.nextSibling;for(var i=e.nextSibling;i!==a;){var s=i.nextSibling;i.parentNode=null,i.previousSibling=null,i.nextSibling=null,i=s}e.nextSibling=a,a!==null?a.previousSibling=e:r.lastChild=e,e.appendData(n.join("")),Ia(r.ownerDocument,r),e=a}else e=t}return!0}})},isSupported:function(r,e){return this.ownerDocument.implementation.hasFeature(r,e)},lookupPrefix:function(r){for(var e=this;e;){var t=e._nsMap;if(t){for(var n in t)if($t(t,n)&&t[n]===r)return n}e=e.nodeType==Ft?e.ownerDocument:e.parentNode}return null},lookupNamespaceURI:function(r){for(var e=this;e;){var t=e._nsMap;if(t&&$t(t,r))return t[r];e=e.nodeType==Ft?e.ownerDocument:e.parentNode}return null},isDefaultNamespace:function(r){var e=this.lookupPrefix(r);return e==null},compareDocumentPosition:function(r){if(this===r)return 0;var e=r,t=this,n=null,a=null;if(e instanceof yt&&(n=e,e=n.ownerElement),t instanceof yt&&(a=t,t=a.ownerElement,n&&e&&t===e))for(var i=0,s;s=t.attributes[i];i++){if(s===n)return X.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+X.DOCUMENT_POSITION_PRECEDING;if(s===a)return X.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+X.DOCUMENT_POSITION_FOLLOWING}if(!e||!t||t.ownerDocument!==e.ownerDocument)return X.DOCUMENT_POSITION_DISCONNECTED+X.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+(gs(t.ownerDocument)>gs(e.ownerDocument)?X.DOCUMENT_POSITION_FOLLOWING:X.DOCUMENT_POSITION_PRECEDING);if(a&&e===t)return X.DOCUMENT_POSITION_CONTAINS+X.DOCUMENT_POSITION_PRECEDING;if(n&&e===t)return X.DOCUMENT_POSITION_CONTAINED_BY+X.DOCUMENT_POSITION_FOLLOWING;for(var o=[],l=e.parentNode;l;){if(!a&&l===t)return X.DOCUMENT_POSITION_CONTAINED_BY+X.DOCUMENT_POSITION_FOLLOWING;o.push(l),l=l.parentNode}o.reverse();for(var u=[],c=t.parentNode;c;){if(!n&&c===e)return X.DOCUMENT_POSITION_CONTAINS+X.DOCUMENT_POSITION_PRECEDING;u.push(c),c=c.parentNode}u.reverse();var d=Ds(o,u);for(var f in d.childNodes){var p=d.childNodes[f];if(p===t)return X.DOCUMENT_POSITION_FOLLOWING;if(p===e)return X.DOCUMENT_POSITION_PRECEDING;if(u.indexOf(p)>=0)return X.DOCUMENT_POSITION_FOLLOWING;if(o.indexOf(p)>=0)return X.DOCUMENT_POSITION_PRECEDING}return 0}};function Ns(r){return r=="<"&&"<"||r==">"&&">"||r=="&"&&"&"||r=='"'&&"""||"&#"+r.charCodeAt()+";"}qt(ye,L);qt(ye,L.prototype);qt(X,L);qt(X,L.prototype);function mn(r,e){de(r,null,{enter:function(t){return e(t)?de.STOP:!0}})}function de(r,e,t){for(var n=[{node:r,context:e,phase:de.ENTER}];n.length>0;){var a=n.pop();if(a.phase===de.ENTER){var i=t.enter(a.node,a.context);if(i===de.STOP)return de.STOP;if(n.push({node:a.node,context:i,phase:de.EXIT}),i==null)continue;for(var s=a.node.lastChild;s;)n.push({node:s,context:i,phase:de.ENTER}),s=s.previousSibling}else t.exit&&t.exit(a.node,a.context)}}de.STOP=Symbol("walkDOM.STOP");de.ENTER=0;de.EXIT=1;function He(r,e){_e(r);var t=e||{};this.ownerDocument=this,this.contentType=t.contentType||xr.XML_APPLICATION,this.type=Zc(this.contentType)?"html":"xml"}function ud(r,e,t){r&&r._inc++;var n=t.namespaceURI;n===$e.XMLNS&&(e._nsMap[t.prefix?t.localName:""]=t.value)}function Ss(r,e,t,n){r&&r._inc++;var a=t.namespaceURI;a===$e.XMLNS&&delete e._nsMap[t.prefix?t.localName:""]}function Ia(r,e,t){if(r&&r._inc){r._inc++;var n=e.childNodes;if(t&&!t.nextSibling)n[n.length++]=t;else{for(var a=e.firstChild,i=0;a;)n[i++]=a,a=a.nextSibling;n.length=i,delete n[n.length]}}}function Is(r,e){if(r!==e.parentNode)throw new x(x.NOT_FOUND_ERR,"child's parent is not parent");var t=e.previousSibling,n=e.nextSibling;return t?t.nextSibling=n:r.firstChild=n,n?n.previousSibling=t:r.lastChild=t,Ia(r.ownerDocument,r),e.parentNode=null,e.previousSibling=null,e.nextSibling=null,e}function cd(r){return r&&(r.nodeType===L.DOCUMENT_NODE||r.nodeType===L.DOCUMENT_FRAGMENT_NODE||r.nodeType===L.ELEMENT_NODE)}function dd(r){return r&&(r.nodeType===L.CDATA_SECTION_NODE||r.nodeType===L.COMMENT_NODE||r.nodeType===L.DOCUMENT_FRAGMENT_NODE||r.nodeType===L.DOCUMENT_TYPE_NODE||r.nodeType===L.ELEMENT_NODE||r.nodeType===L.PROCESSING_INSTRUCTION_NODE||r.nodeType===L.TEXT_NODE)}function lt(r){return r&&r.nodeType===L.DOCUMENT_TYPE_NODE}function Ve(r){return r&&r.nodeType===L.ELEMENT_NODE}function Bs(r){return r&&r.nodeType===L.TEXT_NODE}function _s(r,e){var t=r.childNodes||[];if(Pe(t,Ve)||lt(e))return!1;var n=Pe(t,lt);return!(e&&n&&t.indexOf(n)>t.indexOf(e))}function ws(r,e){var t=r.childNodes||[];function n(i){return Ve(i)&&i!==e}if(Pe(t,n))return!1;var a=Pe(t,lt);return!(e&&a&&t.indexOf(a)>t.indexOf(e))}function fd(r,e,t){if(!cd(r))throw new x(x.HIERARCHY_REQUEST_ERR,"Unexpected parent node type "+r.nodeType);if(t&&t.parentNode!==r)throw new x(x.NOT_FOUND_ERR,"child not in parent");if(!dd(e)||lt(e)&&r.nodeType!==L.DOCUMENT_NODE)throw new x(x.HIERARCHY_REQUEST_ERR,"Unexpected node type "+e.nodeType+" for parent node type "+r.nodeType)}function pd(r,e,t){var n=r.childNodes||[],a=e.childNodes||[];if(e.nodeType===L.DOCUMENT_FRAGMENT_NODE){var i=a.filter(Ve);if(i.length>1||Pe(a,Bs))throw new x(x.HIERARCHY_REQUEST_ERR,"More than one element or text in fragment");if(i.length===1&&!_s(r,t))throw new x(x.HIERARCHY_REQUEST_ERR,"Element in fragment can not be inserted before doctype")}if(Ve(e)&&!_s(r,t))throw new x(x.HIERARCHY_REQUEST_ERR,"Only one element can be added and only after doctype");if(lt(e)){if(Pe(n,lt))throw new x(x.HIERARCHY_REQUEST_ERR,"Only one doctype is allowed");var s=Pe(n,Ve);if(t&&n.indexOf(s)<n.indexOf(t))throw new x(x.HIERARCHY_REQUEST_ERR,"Doctype can only be inserted before an element");if(!t&&s)throw new x(x.HIERARCHY_REQUEST_ERR,"Doctype can not be appended since element is present")}}function Os(r,e,t){var n=r.childNodes||[],a=e.childNodes||[];if(e.nodeType===L.DOCUMENT_FRAGMENT_NODE){var i=a.filter(Ve);if(i.length>1||Pe(a,Bs))throw new x(x.HIERARCHY_REQUEST_ERR,"More than one element or text in fragment");if(i.length===1&&!ws(r,t))throw new x(x.HIERARCHY_REQUEST_ERR,"Element in fragment can not be inserted before doctype")}if(Ve(e)&&!ws(r,t))throw new x(x.HIERARCHY_REQUEST_ERR,"Only one element can be added and only after doctype");if(lt(e)){if(Pe(n,function(l){return lt(l)&&l!==t}))throw new x(x.HIERARCHY_REQUEST_ERR,"Only one doctype is allowed");var s=Pe(n,Ve);if(t&&n.indexOf(s)<n.indexOf(t))throw new x(x.HIERARCHY_REQUEST_ERR,"Doctype can only be inserted before an element")}}function gn(r,e,t,n){fd(r,e,t),r.nodeType===L.DOCUMENT_NODE&&(n||pd)(r,e,t);var a=e.parentNode;if(a&&a.removeChild(e),e.nodeType===ot){var i=e.firstChild;if(i==null)return e;var s=e.lastChild}else i=s=e;var o=t?t.previousSibling:r.lastChild;i.previousSibling=o,s.nextSibling=t,o?o.nextSibling=i:r.firstChild=i,t==null?r.lastChild=s:t.previousSibling=s;do i.parentNode=r;while(i!==s&&(i=i.nextSibling));return Ia(r.ownerDocument||r,r,e),e.nodeType==ot&&(e.firstChild=e.lastChild=null),e}He.prototype={implementation:null,nodeName:"#document",nodeType:Pt,doctype:null,documentElement:null,_inc:1,insertBefore:function(r,e){if(r.nodeType===ot){for(var t=r.firstChild;t;){var n=t.nextSibling;this.insertBefore(t,e),t=n}return r}return gn(this,r,e),r.ownerDocument=this,this.documentElement===null&&r.nodeType===Ae&&(this.documentElement=r),r},removeChild:function(r){var e=Is(this,r);return e===this.documentElement&&(this.documentElement=null),e},replaceChild:function(r,e){gn(this,r,e,Os),r.ownerDocument=this,e&&this.removeChild(e),Ve(r)&&(this.documentElement=r)},importNode:function(r,e){return hd(this,r,e)},getElementById:function(r){var e=null;return mn(this.documentElement,function(t){if(t.nodeType==Ae&&t.getAttribute("id")==r)return e=t,!0}),e},createElement:function(r){var e=new We(ge);e.ownerDocument=this,this.type==="html"&&(r=r.toLowerCase()),Yc(this.contentType)&&(e.namespaceURI=$e.HTML),e.nodeName=r,e.tagName=r,e.localName=r,e.childNodes=new ne;var t=e.attributes=new Ut;return t._ownerElement=e,e},createDocumentFragment:function(){var r=new jt(ge);return r.ownerDocument=this,r.childNodes=new ne,r},createTextNode:function(r){var e=new kr(ge);return e.ownerDocument=this,e.childNodes=new ne,e.appendData(r),e},createComment:function(r){var e=new _n(ge);return e.ownerDocument=this,e.childNodes=new ne,e.appendData(r),e},createCDATASection:function(r){if(r.indexOf("]]>")!==-1)throw new x(x.INVALID_CHARACTER_ERR,'data contains "]]>"');var e=new wn(ge);return e.ownerDocument=this,e.childNodes=new ne,e.appendData(r),e},createProcessingInstruction:function(r,e){var t=new xn(ge);return t.ownerDocument=this,t.childNodes=new ne,t.nodeName=t.target=r,t.nodeValue=t.data=e,t},createAttribute:function(r){if(!Y.QName_exact.test(r))throw new x(x.INVALID_CHARACTER_ERR,'invalid character in name "'+r+'"');return this.type==="html"&&(r=r.toLowerCase()),this._createAttribute(r)},_createAttribute:function(r){var e=new yt(ge);return e.ownerDocument=this,e.childNodes=new ne,e.name=r,e.nodeName=r,e.localName=r,e.specified=!0,e},createEntityReference:function(r){if(!Y.Name_exact.test(r))throw new x(x.INVALID_CHARACTER_ERR,'not a valid xml name "'+r+'"');if(this.type==="html")throw new x("document is an html document",he.NotSupportedError);var e=new vn(ge);return e.ownerDocument=this,e.childNodes=new ne,e.nodeName=r,e},createElementNS:function(r,e){var t=Ta(r,e),n=new We(ge),a=n.attributes=new Ut;return n.childNodes=new ne,n.ownerDocument=this,n.nodeName=e,n.tagName=e,n.namespaceURI=t[0],n.prefix=t[1],n.localName=t[2],a._ownerElement=n,n},createAttributeNS:function(r,e){var t=Ta(r,e),n=new yt(ge);return n.ownerDocument=this,n.childNodes=new ne,n.nodeName=e,n.name=e,n.specified=!0,n.namespaceURI=t[0],n.prefix=t[1],n.localName=t[2],n}};we(He,L);function We(r){_e(r),this._nsMap=Object.create(null)}We.prototype={nodeType:Ae,attributes:null,getQualifiedName:function(){return this.prefix?this.prefix+":"+this.localName:this.localName},_isInHTMLDocumentAndNamespace:function(){return this.ownerDocument.type==="html"&&this.namespaceURI===$e.HTML},hasAttributes:function(){return!!(this.attributes&&this.attributes.length)},hasAttribute:function(r){return!!this.getAttributeNode(r)},getAttribute:function(r){var e=this.getAttributeNode(r);return e?e.value:null},getAttributeNode:function(r){return this._isInHTMLDocumentAndNamespace()&&(r=r.toLowerCase()),this.attributes.getNamedItem(r)},setAttribute:function(r,e){this._isInHTMLDocumentAndNamespace()&&(r=r.toLowerCase());var t=this.getAttributeNode(r);t?t.value=t.nodeValue=""+e:(t=this.ownerDocument._createAttribute(r),t.value=t.nodeValue=""+e,this.setAttributeNode(t))},removeAttribute:function(r){var e=this.getAttributeNode(r);e&&this.removeAttributeNode(e)},setAttributeNode:function(r){return this.attributes.setNamedItem(r)},setAttributeNodeNS:function(r){return this.attributes.setNamedItemNS(r)},removeAttributeNode:function(r){return this.attributes.removeNamedItem(r.nodeName)},removeAttributeNS:function(r,e){var t=this.getAttributeNodeNS(r,e);t&&this.removeAttributeNode(t)},hasAttributeNS:function(r,e){return this.getAttributeNodeNS(r,e)!=null},getAttributeNS:function(r,e){var t=this.getAttributeNodeNS(r,e);return t?t.value:null},setAttributeNS:function(r,e,t){var n=Ta(r,e),a=n[2],i=this.getAttributeNodeNS(r,a);i?i.value=i.nodeValue=""+t:(i=this.ownerDocument.createAttributeNS(r,e),i.value=i.nodeValue=""+t,this.setAttributeNode(i))},getAttributeNodeNS:function(r,e){return this.attributes.getNamedItemNS(r,e)},getElementsByClassName:function(r){var e=ms(r);return new Le(this,function(t){var n=[];return e.length>0&&mn(t,function(a){if(a!==t&&a.nodeType===Ae){var i=a.getAttribute("class");if(i){var s=r===i;if(!s){var o=ms(i);s=e.every(rd(o))}s&&n.push(a)}}}),n})},getElementsByTagName:function(r){var e=(this.nodeType===Pt?this:this.ownerDocument).type==="html",t=r.toLowerCase();return new Le(this,function(n){var a=[];return mn(n,function(i){if(!(i===n||i.nodeType!==Ae))if(r==="*")a.push(i);else{var s=i.getQualifiedName(),o=e&&i.namespaceURI===$e.HTML?t:r;s===o&&a.push(i)}}),a})},getElementsByTagNameNS:function(r,e){return new Le(this,function(t){var n=[];return mn(t,function(a){a!==t&&a.nodeType===Ae&&(r==="*"||a.namespaceURI===r)&&(e==="*"||a.localName==e)&&n.push(a)}),n})}};He.prototype.getElementsByClassName=We.prototype.getElementsByClassName;He.prototype.getElementsByTagName=We.prototype.getElementsByTagName;He.prototype.getElementsByTagNameNS=We.prototype.getElementsByTagNameNS;we(We,L);function yt(r){_e(r),this.namespaceURI=null,this.prefix=null,this.ownerElement=null}yt.prototype.nodeType=Ft;we(yt,L);function ut(r){_e(r)}ut.prototype={data:"",substringData:function(r,e){return this.data.substring(r,r+e)},appendData:function(r){r=this.data+r,this.nodeValue=this.data=r,this.length=r.length},insertData:function(r,e){this.replaceData(r,0,e)},deleteData:function(r,e){this.replaceData(r,e,"")},replaceData:function(r,e,t){var n=this.data.substring(0,r),a=this.data.substring(r+e);t=n+t+a,this.nodeValue=this.data=t,this.length=t.length}};we(ut,L);function kr(r){_e(r)}kr.prototype={nodeName:"#text",nodeType:Er,splitText:function(r){var e=this.data,t=e.substring(r);e=e.substring(0,r),this.data=this.nodeValue=e,this.length=e.length;var n=this.ownerDocument.createTextNode(t);return this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling),n}};we(kr,ut);function _n(r){_e(r)}_n.prototype={nodeName:"#comment",nodeType:Na};we(_n,ut);function wn(r){_e(r)}wn.prototype={nodeName:"#cdata-section",nodeType:Es};we(wn,kr);function yn(r){_e(r)}yn.prototype.nodeType=As;we(yn,L);function Ba(r){_e(r)}Ba.prototype.nodeType=ad;we(Ba,L);function Oa(r){_e(r)}Oa.prototype.nodeType=nd;we(Oa,L);function vn(r){_e(r)}vn.prototype.nodeType=ks;we(vn,L);function jt(r){_e(r)}jt.prototype.nodeName="#document-fragment";jt.prototype.nodeType=ot;we(jt,L);function xn(r){_e(r)}xn.prototype.nodeType=Ca;we(xn,ut);function Ms(){}Ms.prototype.serializeToString=function(r,e){return Rs.call(r,e)};L.prototype.toString=Rs;function Rs(r){var e;typeof r=="function"?e={requireWellFormed:!1,splitCDATASections:!0,nodeFilter:r}:r!=null?e={requireWellFormed:!!r.requireWellFormed,splitCDATASections:r.splitCDATASections!==!1,nodeFilter:r.nodeFilter||null}:e={requireWellFormed:!1,splitCDATASections:!0,nodeFilter:null};var t=[],n=this.nodeType===Pt&&this.documentElement||this,a=n.prefix,i=n.namespaceURI;if(i&&a==null){var a=n.lookupPrefix(i);if(a==null)var s=[{namespace:i,prefix:null}]}return Ma(this,t,s,e),t.join("")}function ys(r,e,t){var n=r.prefix||"",a=r.namespaceURI;if(!a||n==="xml"&&a===$e.XML||a===$e.XMLNS)return!1;for(var i=t.length;i--;){var s=t[i];if(s.prefix===n)return s.namespace!==a}return!0}function hn(r,e,t,n){if(n&&!Y.QName_exact.test(e))throw new x('The attribute name "'+e+'" is not a valid XML QName',he.InvalidStateError);r.push(" ",e,'="',t.replace(/[<>&"\t\n\r]/g,Ns),'"')}function Ma(r,e,t,n){t||(t=[]);var a=n.nodeFilter,i=n.requireWellFormed,s=n.splitCDATASections,o=r.nodeType===Pt?r:r.ownerDocument,l=o.type==="html";de(r,{ns:t},{enter:function(u,c){var d=c.ns;if(a)if(u=a(u),u){if(typeof u=="string")return e.push(u),null}else return null;switch(u.nodeType){case Ae:var f=u.attributes,p=f.length,h=u.tagName,m=h;if(!l&&!u.prefix&&u.namespaceURI){for(var g,b=0;b<f.length;b++)if(f.item(b).name==="xmlns"){g=f.item(b).value;break}if(!g)for(var y=d.length-1;y>=0;y--){var v=d[y];if(v.prefix===""&&v.namespace===u.namespaceURI){g=v.namespace;break}}if(g!==u.namespaceURI)for(var y=d.length-1;y>=0;y--){var v=d[y];if(v.namespace===u.namespaceURI){v.prefix&&(m=v.prefix+":"+h);break}}}if(i&&!Y.QName_exact.test(m))throw new x('The element name "'+m+'" is not a valid XML QName',he.InvalidStateError);e.push("<",m);for(var w=d.slice(),D=0;D<p;D++){var A=f.item(D);A.prefix=="xmlns"?w.push({prefix:A.localName,namespace:A.value}):A.nodeName=="xmlns"&&w.push({prefix:"",namespace:A.value})}for(var D=0;D<p;D++){var A=f.item(D);if(ys(A,l,w)){var $=A.prefix||"",R=A.namespaceURI;hn(e,$?"xmlns:"+$:"xmlns",R,i),w.push({prefix:$,namespace:R})}var z=a?a(A):A;z&&(typeof z=="string"?e.push(z):hn(e,z.name,z.value,i))}if(h===m&&ys(u,l,w)){var me=u.prefix||"",R=u.namespaceURI;hn(e,me?"xmlns:"+me:"xmlns",R,i),w.push({prefix:me,namespace:R})}var M=!u.firstChild;if(M&&(l||u.namespaceURI===$e.HTML)&&(M=Kc(h)),M)return e.push("/>"),null;if(e.push(">"),l&&Jc(h)){for(var V=u.firstChild;V;)V.data?e.push(V.data):Ma(V,e,w.slice(),n),V=V.nextSibling;return e.push("</",m,">"),null}return{ns:w,tag:m};case Pt:case ot:if(i&&u.nodeType===Pt&&u.documentElement==null)throw new x("The Document has no documentElement",he.InvalidStateError);return{ns:d};case Ft:return hn(e,u.name,u.value,i),null;case Er:if(i&&Y.InvalidChar.test(u.data))throw new x("The Text node data contains characters outside the XML Char production",he.InvalidStateError);return e.push(u.data.replace(/[<&>]/g,Ns)),null;case Es:if(i&&u.data.indexOf("]]>")!==-1)throw new x('The CDATASection data contains "]]>"',he.InvalidStateError);return s?e.push(Y.CDATA_START,u.data.replace(/]]>/g,"]]]]><![CDATA[>"),Y.CDATA_END):e.push(Y.CDATA_START,u.data,Y.CDATA_END),null;case Na:if(i){if(Y.InvalidChar.test(u.data))throw new x("The comment node data contains characters outside the XML Char production",he.InvalidStateError);if(u.data.indexOf("--")!==-1||u.data[u.data.length-1]==="-")throw new x('The comment node data contains "--" or ends with "-"',he.InvalidStateError)}return e.push(Y.COMMENT_START,u.data,Y.COMMENT_END),null;case As:var te=u.publicId,U=u.systemId;if(i){if(!Y.Name_exact.test(u.name))throw new x('The doctype name "'+u.name+'" is not a valid XML Name',he.InvalidStateError);if(te&&!Y.PubidLiteral_match.test(te))throw new x("DocumentType publicId is not a valid PubidLiteral",he.InvalidStateError);if(U&&U!=="."&&!Y.SystemLiteral_match.test(U))throw new x("DocumentType systemId is not a valid SystemLiteral",he.InvalidStateError);if(u.internalSubset&&u.internalSubset.indexOf("]>")!==-1)throw new x('DocumentType internalSubset contains "]>"',he.InvalidStateError)}return e.push(Y.DOCTYPE_DECL_START," ",u.name),te?(e.push(" ",Y.PUBLIC," ",te),U&&U!=="."&&e.push(" ",U)):U&&U!=="."&&e.push(" ",Y.SYSTEM," ",U),u.internalSubset&&e.push(" [",u.internalSubset,"]"),e.push(">"),null;case Ca:if(i){if(!Y.NCName_exact.test(u.target)||u.target.toLowerCase()==="xml")throw new x('The processing instruction target "'+u.target+'" is not a valid XML NCName or is reserved',he.InvalidStateError);if(Y.InvalidChar.test(u.data))throw new x("The ProcessingInstruction data contains characters outside the XML Char production",he.InvalidStateError);if(u.data.indexOf("?>")!==-1)throw new x('The ProcessingInstruction data contains "?>"',he.InvalidStateError)}return e.push("<?",u.target," ",u.data,"?>"),null;case ks:if(i&&!Y.Name_exact.test(u.nodeName))throw new x('The entity reference name "'+u.nodeName+'" is not a valid XML Name',he.InvalidStateError);return e.push("&",u.nodeName,";"),null;default:return e.push("??",u.nodeName),null}},exit:function(u,c){c&&c.tag&&e.push("</",c.tag,">")}})}function hd(r,e,t){var n;return de(e,null,{enter:function(a,i){var s=a.cloneNode(!1);s.ownerDocument=r,s.parentNode=null,i===null?n=s:i.appendChild(s);var o=a.nodeType===Ft||t;return o?s:null}}),n}function Ls(r,e,t){var n;return de(e,null,{enter:function(a,i){var s=new a.constructor(ge);for(var o in a)if($t(a,o)){var l=a[o];typeof l!="object"&&l!=s[o]&&(s[o]=l)}a.childNodes&&(s.childNodes=new ne),s.ownerDocument=r;var u=t;switch(s.nodeType){case Ae:var c=a.attributes,d=s.attributes=new Ut,f=c.length;d._ownerElement=s;for(var p=0;p<f;p++)s.setAttributeNode(Ls(r,c.item(p),!0));break;case Ft:u=!0}return i!==null?i.appendChild(s):n=s,u?s:null}}),n}function Ps(r,e,t){r[e]=t}function Da(r){for(var e=[],t=r.firstChild;t;)t.nodeType===Ae&&e.push(t),t=t.nextSibling;return e}try{Object.defineProperty&&(Object.defineProperty(Le.prototype,"length",{get:function(){return bn(this),this.$$length}}),Object.defineProperty(L.prototype,"textContent",{get:function(){if(this.nodeType===Ae||this.nodeType===ot){var r=[];return de(this,null,{enter:function(e){if(e.nodeType===Ae||e.nodeType===ot)return!0;if(e.nodeType===Ca||e.nodeType===Na)return null;r.push(e.nodeValue)}}),r.join("")}return this.nodeValue},set:function(r){switch(this.nodeType){case Ae:case ot:for(;this.firstChild;)this.removeChild(this.firstChild);(r||String(r))&&this.appendChild(this.ownerDocument.createTextNode(r));break;default:this.data=r,this.value=r,this.nodeValue=r}}}),Object.defineProperty(ut.prototype,"data",{get:function(){return this._data!=null?this._data:""},set:function(r){this._data=r,this.length=typeof r=="string"?r.length:0}}),Object.defineProperty(ut.prototype,"nodeValue",{get:function(){return this.data},set:function(r){this.data=r},enumerable:!0,configurable:!0}),Object.defineProperty(We.prototype,"children",{get:function(){return new Le(this,Da)}}),Object.defineProperty(He.prototype,"children",{get:function(){return new Le(this,Da)}}),Object.defineProperty(jt.prototype,"children",{get:function(){return new Le(this,Da)}}),Ps=function(r,e,t){r["$$"+e]=t})}catch{}Z._updateLiveList=bn;Z.Attr=yt;Z.CDATASection=wn;Z.CharacterData=ut;Z.Comment=_n;Z.Document=He;Z.DocumentFragment=jt;Z.DocumentType=yn;Z.DOMImplementation=Cs;Z.Element=We;Z.Entity=Oa;Z.EntityReference=vn;Z.LiveNodeList=Le;Z.NamedNodeMap=Ut;Z.Node=L;Z.NodeList=ne;Z.Notation=Ba;Z.Text=kr;Z.ProcessingInstruction=xn;Z.walkDOM=de;Z.XMLSerializer=Ms});var Fs=Ke(Ar=>{"use strict";var $s=wt().freeze;Ar.XML_ENTITIES=$s({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'});Ar.HTML_ENTITIES=$s({Aacute:"\xC1",aacute:"\xE1",Abreve:"\u0102",abreve:"\u0103",ac:"\u223E",acd:"\u223F",acE:"\u223E\u0333",Acirc:"\xC2",acirc:"\xE2",acute:"\xB4",Acy:"\u0410",acy:"\u0430",AElig:"\xC6",aelig:"\xE6",af:"\u2061",Afr:"\u{1D504}",afr:"\u{1D51E}",Agrave:"\xC0",agrave:"\xE0",alefsym:"\u2135",aleph:"\u2135",Alpha:"\u0391",alpha:"\u03B1",Amacr:"\u0100",amacr:"\u0101",amalg:"\u2A3F",AMP:"&",amp:"&",And:"\u2A53",and:"\u2227",andand:"\u2A55",andd:"\u2A5C",andslope:"\u2A58",andv:"\u2A5A",ang:"\u2220",ange:"\u29A4",angle:"\u2220",angmsd:"\u2221",angmsdaa:"\u29A8",angmsdab:"\u29A9",angmsdac:"\u29AA",angmsdad:"\u29AB",angmsdae:"\u29AC",angmsdaf:"\u29AD",angmsdag:"\u29AE",angmsdah:"\u29AF",angrt:"\u221F",angrtvb:"\u22BE",angrtvbd:"\u299D",angsph:"\u2222",angst:"\xC5",angzarr:"\u237C",Aogon:"\u0104",aogon:"\u0105",Aopf:"\u{1D538}",aopf:"\u{1D552}",ap:"\u2248",apacir:"\u2A6F",apE:"\u2A70",ape:"\u224A",apid:"\u224B",apos:"'",ApplyFunction:"\u2061",approx:"\u2248",approxeq:"\u224A",Aring:"\xC5",aring:"\xE5",Ascr:"\u{1D49C}",ascr:"\u{1D4B6}",Assign:"\u2254",ast:"*",asymp:"\u2248",asympeq:"\u224D",Atilde:"\xC3",atilde:"\xE3",Auml:"\xC4",auml:"\xE4",awconint:"\u2233",awint:"\u2A11",backcong:"\u224C",backepsilon:"\u03F6",backprime:"\u2035",backsim:"\u223D",backsimeq:"\u22CD",Backslash:"\u2216",Barv:"\u2AE7",barvee:"\u22BD",Barwed:"\u2306",barwed:"\u2305",barwedge:"\u2305",bbrk:"\u23B5",bbrktbrk:"\u23B6",bcong:"\u224C",Bcy:"\u0411",bcy:"\u0431",bdquo:"\u201E",becaus:"\u2235",Because:"\u2235",because:"\u2235",bemptyv:"\u29B0",bepsi:"\u03F6",bernou:"\u212C",Bernoullis:"\u212C",Beta:"\u0392",beta:"\u03B2",beth:"\u2136",between:"\u226C",Bfr:"\u{1D505}",bfr:"\u{1D51F}",bigcap:"\u22C2",bigcirc:"\u25EF",bigcup:"\u22C3",bigodot:"\u2A00",bigoplus:"\u2A01",bigotimes:"\u2A02",bigsqcup:"\u2A06",bigstar:"\u2605",bigtriangledown:"\u25BD",bigtriangleup:"\u25B3",biguplus:"\u2A04",bigvee:"\u22C1",bigwedge:"\u22C0",bkarow:"\u290D",blacklozenge:"\u29EB",blacksquare:"\u25AA",blacktriangle:"\u25B4",blacktriangledown:"\u25BE",blacktriangleleft:"\u25C2",blacktriangleright:"\u25B8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20E5",bnequiv:"\u2261\u20E5",bNot:"\u2AED",bnot:"\u2310",Bopf:"\u{1D539}",bopf:"\u{1D553}",bot:"\u22A5",bottom:"\u22A5",bowtie:"\u22C8",boxbox:"\u29C9",boxDL:"\u2557",boxDl:"\u2556",boxdL:"\u2555",boxdl:"\u2510",boxDR:"\u2554",boxDr:"\u2553",boxdR:"\u2552",boxdr:"\u250C",boxH:"\u2550",boxh:"\u2500",boxHD:"\u2566",boxHd:"\u2564",boxhD:"\u2565",boxhd:"\u252C",boxHU:"\u2569",boxHu:"\u2567",boxhU:"\u2568",boxhu:"\u2534",boxminus:"\u229F",boxplus:"\u229E",boxtimes:"\u22A0",boxUL:"\u255D",boxUl:"\u255C",boxuL:"\u255B",boxul:"\u2518",boxUR:"\u255A",boxUr:"\u2559",boxuR:"\u2558",boxur:"\u2514",boxV:"\u2551",boxv:"\u2502",boxVH:"\u256C",boxVh:"\u256B",boxvH:"\u256A",boxvh:"\u253C",boxVL:"\u2563",boxVl:"\u2562",boxvL:"\u2561",boxvl:"\u2524",boxVR:"\u2560",boxVr:"\u255F",boxvR:"\u255E",boxvr:"\u251C",bprime:"\u2035",Breve:"\u02D8",breve:"\u02D8",brvbar:"\xA6",Bscr:"\u212C",bscr:"\u{1D4B7}",bsemi:"\u204F",bsim:"\u223D",bsime:"\u22CD",bsol:"\\",bsolb:"\u29C5",bsolhsub:"\u27C8",bull:"\u2022",bullet:"\u2022",bump:"\u224E",bumpE:"\u2AAE",bumpe:"\u224F",Bumpeq:"\u224E",bumpeq:"\u224F",Cacute:"\u0106",cacute:"\u0107",Cap:"\u22D2",cap:"\u2229",capand:"\u2A44",capbrcup:"\u2A49",capcap:"\u2A4B",capcup:"\u2A47",capdot:"\u2A40",CapitalDifferentialD:"\u2145",caps:"\u2229\uFE00",caret:"\u2041",caron:"\u02C7",Cayleys:"\u212D",ccaps:"\u2A4D",Ccaron:"\u010C",ccaron:"\u010D",Ccedil:"\xC7",ccedil:"\xE7",Ccirc:"\u0108",ccirc:"\u0109",Cconint:"\u2230",ccups:"\u2A4C",ccupssm:"\u2A50",Cdot:"\u010A",cdot:"\u010B",cedil:"\xB8",Cedilla:"\xB8",cemptyv:"\u29B2",cent:"\xA2",CenterDot:"\xB7",centerdot:"\xB7",Cfr:"\u212D",cfr:"\u{1D520}",CHcy:"\u0427",chcy:"\u0447",check:"\u2713",checkmark:"\u2713",Chi:"\u03A7",chi:"\u03C7",cir:"\u25CB",circ:"\u02C6",circeq:"\u2257",circlearrowleft:"\u21BA",circlearrowright:"\u21BB",circledast:"\u229B",circledcirc:"\u229A",circleddash:"\u229D",CircleDot:"\u2299",circledR:"\xAE",circledS:"\u24C8",CircleMinus:"\u2296",CirclePlus:"\u2295",CircleTimes:"\u2297",cirE:"\u29C3",cire:"\u2257",cirfnint:"\u2A10",cirmid:"\u2AEF",cirscir:"\u29C2",ClockwiseContourIntegral:"\u2232",CloseCurlyDoubleQuote:"\u201D",CloseCurlyQuote:"\u2019",clubs:"\u2663",clubsuit:"\u2663",Colon:"\u2237",colon:":",Colone:"\u2A74",colone:"\u2254",coloneq:"\u2254",comma:",",commat:"@",comp:"\u2201",compfn:"\u2218",complement:"\u2201",complexes:"\u2102",cong:"\u2245",congdot:"\u2A6D",Congruent:"\u2261",Conint:"\u222F",conint:"\u222E",ContourIntegral:"\u222E",Copf:"\u2102",copf:"\u{1D554}",coprod:"\u2210",Coproduct:"\u2210",COPY:"\xA9",copy:"\xA9",copysr:"\u2117",CounterClockwiseContourIntegral:"\u2233",crarr:"\u21B5",Cross:"\u2A2F",cross:"\u2717",Cscr:"\u{1D49E}",cscr:"\u{1D4B8}",csub:"\u2ACF",csube:"\u2AD1",csup:"\u2AD0",csupe:"\u2AD2",ctdot:"\u22EF",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22DE",cuesc:"\u22DF",cularr:"\u21B6",cularrp:"\u293D",Cup:"\u22D3",cup:"\u222A",cupbrcap:"\u2A48",CupCap:"\u224D",cupcap:"\u2A46",cupcup:"\u2A4A",cupdot:"\u228D",cupor:"\u2A45",cups:"\u222A\uFE00",curarr:"\u21B7",curarrm:"\u293C",curlyeqprec:"\u22DE",curlyeqsucc:"\u22DF",curlyvee:"\u22CE",curlywedge:"\u22CF",curren:"\xA4",curvearrowleft:"\u21B6",curvearrowright:"\u21B7",cuvee:"\u22CE",cuwed:"\u22CF",cwconint:"\u2232",cwint:"\u2231",cylcty:"\u232D",Dagger:"\u2021",dagger:"\u2020",daleth:"\u2138",Darr:"\u21A1",dArr:"\u21D3",darr:"\u2193",dash:"\u2010",Dashv:"\u2AE4",dashv:"\u22A3",dbkarow:"\u290F",dblac:"\u02DD",Dcaron:"\u010E",dcaron:"\u010F",Dcy:"\u0414",dcy:"\u0434",DD:"\u2145",dd:"\u2146",ddagger:"\u2021",ddarr:"\u21CA",DDotrahd:"\u2911",ddotseq:"\u2A77",deg:"\xB0",Del:"\u2207",Delta:"\u0394",delta:"\u03B4",demptyv:"\u29B1",dfisht:"\u297F",Dfr:"\u{1D507}",dfr:"\u{1D521}",dHar:"\u2965",dharl:"\u21C3",dharr:"\u21C2",DiacriticalAcute:"\xB4",DiacriticalDot:"\u02D9",DiacriticalDoubleAcute:"\u02DD",DiacriticalGrave:"`",DiacriticalTilde:"\u02DC",diam:"\u22C4",Diamond:"\u22C4",diamond:"\u22C4",diamondsuit:"\u2666",diams:"\u2666",die:"\xA8",DifferentialD:"\u2146",digamma:"\u03DD",disin:"\u22F2",div:"\xF7",divide:"\xF7",divideontimes:"\u22C7",divonx:"\u22C7",DJcy:"\u0402",djcy:"\u0452",dlcorn:"\u231E",dlcrop:"\u230D",dollar:"$",Dopf:"\u{1D53B}",dopf:"\u{1D555}",Dot:"\xA8",dot:"\u02D9",DotDot:"\u20DC",doteq:"\u2250",doteqdot:"\u2251",DotEqual:"\u2250",dotminus:"\u2238",dotplus:"\u2214",dotsquare:"\u22A1",doublebarwedge:"\u2306",DoubleContourIntegral:"\u222F",DoubleDot:"\xA8",DoubleDownArrow:"\u21D3",DoubleLeftArrow:"\u21D0",DoubleLeftRightArrow:"\u21D4",DoubleLeftTee:"\u2AE4",DoubleLongLeftArrow:"\u27F8",DoubleLongLeftRightArrow:"\u27FA",DoubleLongRightArrow:"\u27F9",DoubleRightArrow:"\u21D2",DoubleRightTee:"\u22A8",DoubleUpArrow:"\u21D1",DoubleUpDownArrow:"\u21D5",DoubleVerticalBar:"\u2225",DownArrow:"\u2193",Downarrow:"\u21D3",downarrow:"\u2193",DownArrowBar:"\u2913",DownArrowUpArrow:"\u21F5",DownBreve:"\u0311",downdownarrows:"\u21CA",downharpoonleft:"\u21C3",downharpoonright:"\u21C2",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295E",DownLeftVector:"\u21BD",DownLeftVectorBar:"\u2956",DownRightTeeVector:"\u295F",DownRightVector:"\u21C1",DownRightVectorBar:"\u2957",DownTee:"\u22A4",DownTeeArrow:"\u21A7",drbkarow:"\u2910",drcorn:"\u231F",drcrop:"\u230C",Dscr:"\u{1D49F}",dscr:"\u{1D4B9}",DScy:"\u0405",dscy:"\u0455",dsol:"\u29F6",Dstrok:"\u0110",dstrok:"\u0111",dtdot:"\u22F1",dtri:"\u25BF",dtrif:"\u25BE",duarr:"\u21F5",duhar:"\u296F",dwangle:"\u29A6",DZcy:"\u040F",dzcy:"\u045F",dzigrarr:"\u27FF",Eacute:"\xC9",eacute:"\xE9",easter:"\u2A6E",Ecaron:"\u011A",ecaron:"\u011B",ecir:"\u2256",Ecirc:"\xCA",ecirc:"\xEA",ecolon:"\u2255",Ecy:"\u042D",ecy:"\u044D",eDDot:"\u2A77",Edot:"\u0116",eDot:"\u2251",edot:"\u0117",ee:"\u2147",efDot:"\u2252",Efr:"\u{1D508}",efr:"\u{1D522}",eg:"\u2A9A",Egrave:"\xC8",egrave:"\xE8",egs:"\u2A96",egsdot:"\u2A98",el:"\u2A99",Element:"\u2208",elinters:"\u23E7",ell:"\u2113",els:"\u2A95",elsdot:"\u2A97",Emacr:"\u0112",emacr:"\u0113",empty:"\u2205",emptyset:"\u2205",EmptySmallSquare:"\u25FB",emptyv:"\u2205",EmptyVerySmallSquare:"\u25AB",emsp:"\u2003",emsp13:"\u2004",emsp14:"\u2005",ENG:"\u014A",eng:"\u014B",ensp:"\u2002",Eogon:"\u0118",eogon:"\u0119",Eopf:"\u{1D53C}",eopf:"\u{1D556}",epar:"\u22D5",eparsl:"\u29E3",eplus:"\u2A71",epsi:"\u03B5",Epsilon:"\u0395",epsilon:"\u03B5",epsiv:"\u03F5",eqcirc:"\u2256",eqcolon:"\u2255",eqsim:"\u2242",eqslantgtr:"\u2A96",eqslantless:"\u2A95",Equal:"\u2A75",equals:"=",EqualTilde:"\u2242",equest:"\u225F",Equilibrium:"\u21CC",equiv:"\u2261",equivDD:"\u2A78",eqvparsl:"\u29E5",erarr:"\u2971",erDot:"\u2253",Escr:"\u2130",escr:"\u212F",esdot:"\u2250",Esim:"\u2A73",esim:"\u2242",Eta:"\u0397",eta:"\u03B7",ETH:"\xD0",eth:"\xF0",Euml:"\xCB",euml:"\xEB",euro:"\u20AC",excl:"!",exist:"\u2203",Exists:"\u2203",expectation:"\u2130",ExponentialE:"\u2147",exponentiale:"\u2147",fallingdotseq:"\u2252",Fcy:"\u0424",fcy:"\u0444",female:"\u2640",ffilig:"\uFB03",fflig:"\uFB00",ffllig:"\uFB04",Ffr:"\u{1D509}",ffr:"\u{1D523}",filig:"\uFB01",FilledSmallSquare:"\u25FC",FilledVerySmallSquare:"\u25AA",fjlig:"fj",flat:"\u266D",fllig:"\uFB02",fltns:"\u25B1",fnof:"\u0192",Fopf:"\u{1D53D}",fopf:"\u{1D557}",ForAll:"\u2200",forall:"\u2200",fork:"\u22D4",forkv:"\u2AD9",Fouriertrf:"\u2131",fpartint:"\u2A0D",frac12:"\xBD",frac13:"\u2153",frac14:"\xBC",frac15:"\u2155",frac16:"\u2159",frac18:"\u215B",frac23:"\u2154",frac25:"\u2156",frac34:"\xBE",frac35:"\u2157",frac38:"\u215C",frac45:"\u2158",frac56:"\u215A",frac58:"\u215D",frac78:"\u215E",frasl:"\u2044",frown:"\u2322",Fscr:"\u2131",fscr:"\u{1D4BB}",gacute:"\u01F5",Gamma:"\u0393",gamma:"\u03B3",Gammad:"\u03DC",gammad:"\u03DD",gap:"\u2A86",Gbreve:"\u011E",gbreve:"\u011F",Gcedil:"\u0122",Gcirc:"\u011C",gcirc:"\u011D",Gcy:"\u0413",gcy:"\u0433",Gdot:"\u0120",gdot:"\u0121",gE:"\u2267",ge:"\u2265",gEl:"\u2A8C",gel:"\u22DB",geq:"\u2265",geqq:"\u2267",geqslant:"\u2A7E",ges:"\u2A7E",gescc:"\u2AA9",gesdot:"\u2A80",gesdoto:"\u2A82",gesdotol:"\u2A84",gesl:"\u22DB\uFE00",gesles:"\u2A94",Gfr:"\u{1D50A}",gfr:"\u{1D524}",Gg:"\u22D9",gg:"\u226B",ggg:"\u22D9",gimel:"\u2137",GJcy:"\u0403",gjcy:"\u0453",gl:"\u2277",gla:"\u2AA5",glE:"\u2A92",glj:"\u2AA4",gnap:"\u2A8A",gnapprox:"\u2A8A",gnE:"\u2269",gne:"\u2A88",gneq:"\u2A88",gneqq:"\u2269",gnsim:"\u22E7",Gopf:"\u{1D53E}",gopf:"\u{1D558}",grave:"`",GreaterEqual:"\u2265",GreaterEqualLess:"\u22DB",GreaterFullEqual:"\u2267",GreaterGreater:"\u2AA2",GreaterLess:"\u2277",GreaterSlantEqual:"\u2A7E",GreaterTilde:"\u2273",Gscr:"\u{1D4A2}",gscr:"\u210A",gsim:"\u2273",gsime:"\u2A8E",gsiml:"\u2A90",Gt:"\u226B",GT:">",gt:">",gtcc:"\u2AA7",gtcir:"\u2A7A",gtdot:"\u22D7",gtlPar:"\u2995",gtquest:"\u2A7C",gtrapprox:"\u2A86",gtrarr:"\u2978",gtrdot:"\u22D7",gtreqless:"\u22DB",gtreqqless:"\u2A8C",gtrless:"\u2277",gtrsim:"\u2273",gvertneqq:"\u2269\uFE00",gvnE:"\u2269\uFE00",Hacek:"\u02C7",hairsp:"\u200A",half:"\xBD",hamilt:"\u210B",HARDcy:"\u042A",hardcy:"\u044A",hArr:"\u21D4",harr:"\u2194",harrcir:"\u2948",harrw:"\u21AD",Hat:"^",hbar:"\u210F",Hcirc:"\u0124",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",hercon:"\u22B9",Hfr:"\u210C",hfr:"\u{1D525}",HilbertSpace:"\u210B",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21FF",homtht:"\u223B",hookleftarrow:"\u21A9",hookrightarrow:"\u21AA",Hopf:"\u210D",hopf:"\u{1D559}",horbar:"\u2015",HorizontalLine:"\u2500",Hscr:"\u210B",hscr:"\u{1D4BD}",hslash:"\u210F",Hstrok:"\u0126",hstrok:"\u0127",HumpDownHump:"\u224E",HumpEqual:"\u224F",hybull:"\u2043",hyphen:"\u2010",Iacute:"\xCD",iacute:"\xED",ic:"\u2063",Icirc:"\xCE",icirc:"\xEE",Icy:"\u0418",icy:"\u0438",Idot:"\u0130",IEcy:"\u0415",iecy:"\u0435",iexcl:"\xA1",iff:"\u21D4",Ifr:"\u2111",ifr:"\u{1D526}",Igrave:"\xCC",igrave:"\xEC",ii:"\u2148",iiiint:"\u2A0C",iiint:"\u222D",iinfin:"\u29DC",iiota:"\u2129",IJlig:"\u0132",ijlig:"\u0133",Im:"\u2111",Imacr:"\u012A",imacr:"\u012B",image:"\u2111",ImaginaryI:"\u2148",imagline:"\u2110",imagpart:"\u2111",imath:"\u0131",imof:"\u22B7",imped:"\u01B5",Implies:"\u21D2",in:"\u2208",incare:"\u2105",infin:"\u221E",infintie:"\u29DD",inodot:"\u0131",Int:"\u222C",int:"\u222B",intcal:"\u22BA",integers:"\u2124",Integral:"\u222B",intercal:"\u22BA",Intersection:"\u22C2",intlarhk:"\u2A17",intprod:"\u2A3C",InvisibleComma:"\u2063",InvisibleTimes:"\u2062",IOcy:"\u0401",iocy:"\u0451",Iogon:"\u012E",iogon:"\u012F",Iopf:"\u{1D540}",iopf:"\u{1D55A}",Iota:"\u0399",iota:"\u03B9",iprod:"\u2A3C",iquest:"\xBF",Iscr:"\u2110",iscr:"\u{1D4BE}",isin:"\u2208",isindot:"\u22F5",isinE:"\u22F9",isins:"\u22F4",isinsv:"\u22F3",isinv:"\u2208",it:"\u2062",Itilde:"\u0128",itilde:"\u0129",Iukcy:"\u0406",iukcy:"\u0456",Iuml:"\xCF",iuml:"\xEF",Jcirc:"\u0134",jcirc:"\u0135",Jcy:"\u0419",jcy:"\u0439",Jfr:"\u{1D50D}",jfr:"\u{1D527}",jmath:"\u0237",Jopf:"\u{1D541}",jopf:"\u{1D55B}",Jscr:"\u{1D4A5}",jscr:"\u{1D4BF}",Jsercy:"\u0408",jsercy:"\u0458",Jukcy:"\u0404",jukcy:"\u0454",Kappa:"\u039A",kappa:"\u03BA",kappav:"\u03F0",Kcedil:"\u0136",kcedil:"\u0137",Kcy:"\u041A",kcy:"\u043A",Kfr:"\u{1D50E}",kfr:"\u{1D528}",kgreen:"\u0138",KHcy:"\u0425",khcy:"\u0445",KJcy:"\u040C",kjcy:"\u045C",Kopf:"\u{1D542}",kopf:"\u{1D55C}",Kscr:"\u{1D4A6}",kscr:"\u{1D4C0}",lAarr:"\u21DA",Lacute:"\u0139",lacute:"\u013A",laemptyv:"\u29B4",lagran:"\u2112",Lambda:"\u039B",lambda:"\u03BB",Lang:"\u27EA",lang:"\u27E8",langd:"\u2991",langle:"\u27E8",lap:"\u2A85",Laplacetrf:"\u2112",laquo:"\xAB",Larr:"\u219E",lArr:"\u21D0",larr:"\u2190",larrb:"\u21E4",larrbfs:"\u291F",larrfs:"\u291D",larrhk:"\u21A9",larrlp:"\u21AB",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21A2",lat:"\u2AAB",lAtail:"\u291B",latail:"\u2919",late:"\u2AAD",lates:"\u2AAD\uFE00",lBarr:"\u290E",lbarr:"\u290C",lbbrk:"\u2772",lbrace:"{",lbrack:"[",lbrke:"\u298B",lbrksld:"\u298F",lbrkslu:"\u298D",Lcaron:"\u013D",lcaron:"\u013E",Lcedil:"\u013B",lcedil:"\u013C",lceil:"\u2308",lcub:"{",Lcy:"\u041B",lcy:"\u043B",ldca:"\u2936",ldquo:"\u201C",ldquor:"\u201E",ldrdhar:"\u2967",ldrushar:"\u294B",ldsh:"\u21B2",lE:"\u2266",le:"\u2264",LeftAngleBracket:"\u27E8",LeftArrow:"\u2190",Leftarrow:"\u21D0",leftarrow:"\u2190",LeftArrowBar:"\u21E4",LeftArrowRightArrow:"\u21C6",leftarrowtail:"\u21A2",LeftCeiling:"\u2308",LeftDoubleBracket:"\u27E6",LeftDownTeeVector:"\u2961",LeftDownVector:"\u21C3",LeftDownVectorBar:"\u2959",LeftFloor:"\u230A",leftharpoondown:"\u21BD",leftharpoonup:"\u21BC",leftleftarrows:"\u21C7",LeftRightArrow:"\u2194",Leftrightarrow:"\u21D4",leftrightarrow:"\u2194",leftrightarrows:"\u21C6",leftrightharpoons:"\u21CB",leftrightsquigarrow:"\u21AD",LeftRightVector:"\u294E",LeftTee:"\u22A3",LeftTeeArrow:"\u21A4",LeftTeeVector:"\u295A",leftthreetimes:"\u22CB",LeftTriangle:"\u22B2",LeftTriangleBar:"\u29CF",LeftTriangleEqual:"\u22B4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVector:"\u21BF",LeftUpVectorBar:"\u2958",LeftVector:"\u21BC",LeftVectorBar:"\u2952",lEg:"\u2A8B",leg:"\u22DA",leq:"\u2264",leqq:"\u2266",leqslant:"\u2A7D",les:"\u2A7D",lescc:"\u2AA8",lesdot:"\u2A7F",lesdoto:"\u2A81",lesdotor:"\u2A83",lesg:"\u22DA\uFE00",lesges:"\u2A93",lessapprox:"\u2A85",lessdot:"\u22D6",lesseqgtr:"\u22DA",lesseqqgtr:"\u2A8B",LessEqualGreater:"\u22DA",LessFullEqual:"\u2266",LessGreater:"\u2276",lessgtr:"\u2276",LessLess:"\u2AA1",lesssim:"\u2272",LessSlantEqual:"\u2A7D",LessTilde:"\u2272",lfisht:"\u297C",lfloor:"\u230A",Lfr:"\u{1D50F}",lfr:"\u{1D529}",lg:"\u2276",lgE:"\u2A91",lHar:"\u2962",lhard:"\u21BD",lharu:"\u21BC",lharul:"\u296A",lhblk:"\u2584",LJcy:"\u0409",ljcy:"\u0459",Ll:"\u22D8",ll:"\u226A",llarr:"\u21C7",llcorner:"\u231E",Lleftarrow:"\u21DA",llhard:"\u296B",lltri:"\u25FA",Lmidot:"\u013F",lmidot:"\u0140",lmoust:"\u23B0",lmoustache:"\u23B0",lnap:"\u2A89",lnapprox:"\u2A89",lnE:"\u2268",lne:"\u2A87",lneq:"\u2A87",lneqq:"\u2268",lnsim:"\u22E6",loang:"\u27EC",loarr:"\u21FD",lobrk:"\u27E6",LongLeftArrow:"\u27F5",Longleftarrow:"\u27F8",longleftarrow:"\u27F5",LongLeftRightArrow:"\u27F7",Longleftrightarrow:"\u27FA",longleftrightarrow:"\u27F7",longmapsto:"\u27FC",LongRightArrow:"\u27F6",Longrightarrow:"\u27F9",longrightarrow:"\u27F6",looparrowleft:"\u21AB",looparrowright:"\u21AC",lopar:"\u2985",Lopf:"\u{1D543}",lopf:"\u{1D55D}",loplus:"\u2A2D",lotimes:"\u2A34",lowast:"\u2217",lowbar:"_",LowerLeftArrow:"\u2199",LowerRightArrow:"\u2198",loz:"\u25CA",lozenge:"\u25CA",lozf:"\u29EB",lpar:"(",lparlt:"\u2993",lrarr:"\u21C6",lrcorner:"\u231F",lrhar:"\u21CB",lrhard:"\u296D",lrm:"\u200E",lrtri:"\u22BF",lsaquo:"\u2039",Lscr:"\u2112",lscr:"\u{1D4C1}",Lsh:"\u21B0",lsh:"\u21B0",lsim:"\u2272",lsime:"\u2A8D",lsimg:"\u2A8F",lsqb:"[",lsquo:"\u2018",lsquor:"\u201A",Lstrok:"\u0141",lstrok:"\u0142",Lt:"\u226A",LT:"<",lt:"<",ltcc:"\u2AA6",ltcir:"\u2A79",ltdot:"\u22D6",lthree:"\u22CB",ltimes:"\u22C9",ltlarr:"\u2976",ltquest:"\u2A7B",ltri:"\u25C3",ltrie:"\u22B4",ltrif:"\u25C2",ltrPar:"\u2996",lurdshar:"\u294A",luruhar:"\u2966",lvertneqq:"\u2268\uFE00",lvnE:"\u2268\uFE00",macr:"\xAF",male:"\u2642",malt:"\u2720",maltese:"\u2720",Map:"\u2905",map:"\u21A6",mapsto:"\u21A6",mapstodown:"\u21A7",mapstoleft:"\u21A4",mapstoup:"\u21A5",marker:"\u25AE",mcomma:"\u2A29",Mcy:"\u041C",mcy:"\u043C",mdash:"\u2014",mDDot:"\u223A",measuredangle:"\u2221",MediumSpace:"\u205F",Mellintrf:"\u2133",Mfr:"\u{1D510}",mfr:"\u{1D52A}",mho:"\u2127",micro:"\xB5",mid:"\u2223",midast:"*",midcir:"\u2AF0",middot:"\xB7",minus:"\u2212",minusb:"\u229F",minusd:"\u2238",minusdu:"\u2A2A",MinusPlus:"\u2213",mlcp:"\u2ADB",mldr:"\u2026",mnplus:"\u2213",models:"\u22A7",Mopf:"\u{1D544}",mopf:"\u{1D55E}",mp:"\u2213",Mscr:"\u2133",mscr:"\u{1D4C2}",mstpos:"\u223E",Mu:"\u039C",mu:"\u03BC",multimap:"\u22B8",mumap:"\u22B8",nabla:"\u2207",Nacute:"\u0143",nacute:"\u0144",nang:"\u2220\u20D2",nap:"\u2249",napE:"\u2A70\u0338",napid:"\u224B\u0338",napos:"\u0149",napprox:"\u2249",natur:"\u266E",natural:"\u266E",naturals:"\u2115",nbsp:"\xA0",nbump:"\u224E\u0338",nbumpe:"\u224F\u0338",ncap:"\u2A43",Ncaron:"\u0147",ncaron:"\u0148",Ncedil:"\u0145",ncedil:"\u0146",ncong:"\u2247",ncongdot:"\u2A6D\u0338",ncup:"\u2A42",Ncy:"\u041D",ncy:"\u043D",ndash:"\u2013",ne:"\u2260",nearhk:"\u2924",neArr:"\u21D7",nearr:"\u2197",nearrow:"\u2197",nedot:"\u2250\u0338",NegativeMediumSpace:"\u200B",NegativeThickSpace:"\u200B",NegativeThinSpace:"\u200B",NegativeVeryThinSpace:"\u200B",nequiv:"\u2262",nesear:"\u2928",nesim:"\u2242\u0338",NestedGreaterGreater:"\u226B",NestedLessLess:"\u226A",NewLine:`
|
|
2
|
-
`,nexist:"\u2204",nexists:"\u2204",Nfr:"\u{1D511}",nfr:"\u{1D52B}",ngE:"\u2267\u0338",nge:"\u2271",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",nGg:"\u22D9\u0338",ngsim:"\u2275",nGt:"\u226B\u20D2",ngt:"\u226F",ngtr:"\u226F",nGtv:"\u226B\u0338",nhArr:"\u21CE",nharr:"\u21AE",nhpar:"\u2AF2",ni:"\u220B",nis:"\u22FC",nisd:"\u22FA",niv:"\u220B",NJcy:"\u040A",njcy:"\u045A",nlArr:"\u21CD",nlarr:"\u219A",nldr:"\u2025",nlE:"\u2266\u0338",nle:"\u2270",nLeftarrow:"\u21CD",nleftarrow:"\u219A",nLeftrightarrow:"\u21CE",nleftrightarrow:"\u21AE",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",nless:"\u226E",nLl:"\u22D8\u0338",nlsim:"\u2274",nLt:"\u226A\u20D2",nlt:"\u226E",nltri:"\u22EA",nltrie:"\u22EC",nLtv:"\u226A\u0338",nmid:"\u2224",NoBreak:"\u2060",NonBreakingSpace:"\xA0",Nopf:"\u2115",nopf:"\u{1D55F}",Not:"\u2AEC",not:"\xAC",NotCongruent:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",notin:"\u2209",notindot:"\u22F5\u0338",notinE:"\u22F9\u0338",notinva:"\u2209",notinvb:"\u22F7",notinvc:"\u22F6",NotLeftTriangle:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",notni:"\u220C",notniva:"\u220C",notnivb:"\u22FE",notnivc:"\u22FD",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",NotReverseElement:"\u220C",NotRightTriangle:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",NotSubset:"\u2282\u20D2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",npar:"\u2226",nparallel:"\u2226",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",npr:"\u2280",nprcue:"\u22E0",npre:"\u2AAF\u0338",nprec:"\u2280",npreceq:"\u2AAF\u0338",nrArr:"\u21CF",nrarr:"\u219B",nrarrc:"\u2933\u0338",nrarrw:"\u219D\u0338",nRightarrow:"\u21CF",nrightarrow:"\u219B",nrtri:"\u22EB",nrtrie:"\u22ED",nsc:"\u2281",nsccue:"\u22E1",nsce:"\u2AB0\u0338",Nscr:"\u{1D4A9}",nscr:"\u{1D4C3}",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22E2",nsqsupe:"\u22E3",nsub:"\u2284",nsubE:"\u2AC5\u0338",nsube:"\u2288",nsubset:"\u2282\u20D2",nsubseteq:"\u2288",nsubseteqq:"\u2AC5\u0338",nsucc:"\u2281",nsucceq:"\u2AB0\u0338",nsup:"\u2285",nsupE:"\u2AC6\u0338",nsupe:"\u2289",nsupset:"\u2283\u20D2",nsupseteq:"\u2289",nsupseteqq:"\u2AC6\u0338",ntgl:"\u2279",Ntilde:"\xD1",ntilde:"\xF1",ntlg:"\u2278",ntriangleleft:"\u22EA",ntrianglelefteq:"\u22EC",ntriangleright:"\u22EB",ntrianglerighteq:"\u22ED",Nu:"\u039D",nu:"\u03BD",num:"#",numero:"\u2116",numsp:"\u2007",nvap:"\u224D\u20D2",nVDash:"\u22AF",nVdash:"\u22AE",nvDash:"\u22AD",nvdash:"\u22AC",nvge:"\u2265\u20D2",nvgt:">\u20D2",nvHarr:"\u2904",nvinfin:"\u29DE",nvlArr:"\u2902",nvle:"\u2264\u20D2",nvlt:"<\u20D2",nvltrie:"\u22B4\u20D2",nvrArr:"\u2903",nvrtrie:"\u22B5\u20D2",nvsim:"\u223C\u20D2",nwarhk:"\u2923",nwArr:"\u21D6",nwarr:"\u2196",nwarrow:"\u2196",nwnear:"\u2927",Oacute:"\xD3",oacute:"\xF3",oast:"\u229B",ocir:"\u229A",Ocirc:"\xD4",ocirc:"\xF4",Ocy:"\u041E",ocy:"\u043E",odash:"\u229D",Odblac:"\u0150",odblac:"\u0151",odiv:"\u2A38",odot:"\u2299",odsold:"\u29BC",OElig:"\u0152",oelig:"\u0153",ofcir:"\u29BF",Ofr:"\u{1D512}",ofr:"\u{1D52C}",ogon:"\u02DB",Ograve:"\xD2",ograve:"\xF2",ogt:"\u29C1",ohbar:"\u29B5",ohm:"\u03A9",oint:"\u222E",olarr:"\u21BA",olcir:"\u29BE",olcross:"\u29BB",oline:"\u203E",olt:"\u29C0",Omacr:"\u014C",omacr:"\u014D",Omega:"\u03A9",omega:"\u03C9",Omicron:"\u039F",omicron:"\u03BF",omid:"\u29B6",ominus:"\u2296",Oopf:"\u{1D546}",oopf:"\u{1D560}",opar:"\u29B7",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",operp:"\u29B9",oplus:"\u2295",Or:"\u2A54",or:"\u2228",orarr:"\u21BB",ord:"\u2A5D",order:"\u2134",orderof:"\u2134",ordf:"\xAA",ordm:"\xBA",origof:"\u22B6",oror:"\u2A56",orslope:"\u2A57",orv:"\u2A5B",oS:"\u24C8",Oscr:"\u{1D4AA}",oscr:"\u2134",Oslash:"\xD8",oslash:"\xF8",osol:"\u2298",Otilde:"\xD5",otilde:"\xF5",Otimes:"\u2A37",otimes:"\u2297",otimesas:"\u2A36",Ouml:"\xD6",ouml:"\xF6",ovbar:"\u233D",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",OverParenthesis:"\u23DC",par:"\u2225",para:"\xB6",parallel:"\u2225",parsim:"\u2AF3",parsl:"\u2AFD",part:"\u2202",PartialD:"\u2202",Pcy:"\u041F",pcy:"\u043F",percnt:"%",period:".",permil:"\u2030",perp:"\u22A5",pertenk:"\u2031",Pfr:"\u{1D513}",pfr:"\u{1D52D}",Phi:"\u03A6",phi:"\u03C6",phiv:"\u03D5",phmmat:"\u2133",phone:"\u260E",Pi:"\u03A0",pi:"\u03C0",pitchfork:"\u22D4",piv:"\u03D6",planck:"\u210F",planckh:"\u210E",plankv:"\u210F",plus:"+",plusacir:"\u2A23",plusb:"\u229E",pluscir:"\u2A22",plusdo:"\u2214",plusdu:"\u2A25",pluse:"\u2A72",PlusMinus:"\xB1",plusmn:"\xB1",plussim:"\u2A26",plustwo:"\u2A27",pm:"\xB1",Poincareplane:"\u210C",pointint:"\u2A15",Popf:"\u2119",popf:"\u{1D561}",pound:"\xA3",Pr:"\u2ABB",pr:"\u227A",prap:"\u2AB7",prcue:"\u227C",prE:"\u2AB3",pre:"\u2AAF",prec:"\u227A",precapprox:"\u2AB7",preccurlyeq:"\u227C",Precedes:"\u227A",PrecedesEqual:"\u2AAF",PrecedesSlantEqual:"\u227C",PrecedesTilde:"\u227E",preceq:"\u2AAF",precnapprox:"\u2AB9",precneqq:"\u2AB5",precnsim:"\u22E8",precsim:"\u227E",Prime:"\u2033",prime:"\u2032",primes:"\u2119",prnap:"\u2AB9",prnE:"\u2AB5",prnsim:"\u22E8",prod:"\u220F",Product:"\u220F",profalar:"\u232E",profline:"\u2312",profsurf:"\u2313",prop:"\u221D",Proportion:"\u2237",Proportional:"\u221D",propto:"\u221D",prsim:"\u227E",prurel:"\u22B0",Pscr:"\u{1D4AB}",pscr:"\u{1D4C5}",Psi:"\u03A8",psi:"\u03C8",puncsp:"\u2008",Qfr:"\u{1D514}",qfr:"\u{1D52E}",qint:"\u2A0C",Qopf:"\u211A",qopf:"\u{1D562}",qprime:"\u2057",Qscr:"\u{1D4AC}",qscr:"\u{1D4C6}",quaternions:"\u210D",quatint:"\u2A16",quest:"?",questeq:"\u225F",QUOT:'"',quot:'"',rAarr:"\u21DB",race:"\u223D\u0331",Racute:"\u0154",racute:"\u0155",radic:"\u221A",raemptyv:"\u29B3",Rang:"\u27EB",rang:"\u27E9",rangd:"\u2992",range:"\u29A5",rangle:"\u27E9",raquo:"\xBB",Rarr:"\u21A0",rArr:"\u21D2",rarr:"\u2192",rarrap:"\u2975",rarrb:"\u21E5",rarrbfs:"\u2920",rarrc:"\u2933",rarrfs:"\u291E",rarrhk:"\u21AA",rarrlp:"\u21AC",rarrpl:"\u2945",rarrsim:"\u2974",Rarrtl:"\u2916",rarrtl:"\u21A3",rarrw:"\u219D",rAtail:"\u291C",ratail:"\u291A",ratio:"\u2236",rationals:"\u211A",RBarr:"\u2910",rBarr:"\u290F",rbarr:"\u290D",rbbrk:"\u2773",rbrace:"}",rbrack:"]",rbrke:"\u298C",rbrksld:"\u298E",rbrkslu:"\u2990",Rcaron:"\u0158",rcaron:"\u0159",Rcedil:"\u0156",rcedil:"\u0157",rceil:"\u2309",rcub:"}",Rcy:"\u0420",rcy:"\u0440",rdca:"\u2937",rdldhar:"\u2969",rdquo:"\u201D",rdquor:"\u201D",rdsh:"\u21B3",Re:"\u211C",real:"\u211C",realine:"\u211B",realpart:"\u211C",reals:"\u211D",rect:"\u25AD",REG:"\xAE",reg:"\xAE",ReverseElement:"\u220B",ReverseEquilibrium:"\u21CB",ReverseUpEquilibrium:"\u296F",rfisht:"\u297D",rfloor:"\u230B",Rfr:"\u211C",rfr:"\u{1D52F}",rHar:"\u2964",rhard:"\u21C1",rharu:"\u21C0",rharul:"\u296C",Rho:"\u03A1",rho:"\u03C1",rhov:"\u03F1",RightAngleBracket:"\u27E9",RightArrow:"\u2192",Rightarrow:"\u21D2",rightarrow:"\u2192",RightArrowBar:"\u21E5",RightArrowLeftArrow:"\u21C4",rightarrowtail:"\u21A3",RightCeiling:"\u2309",RightDoubleBracket:"\u27E7",RightDownTeeVector:"\u295D",RightDownVector:"\u21C2",RightDownVectorBar:"\u2955",RightFloor:"\u230B",rightharpoondown:"\u21C1",rightharpoonup:"\u21C0",rightleftarrows:"\u21C4",rightleftharpoons:"\u21CC",rightrightarrows:"\u21C9",rightsquigarrow:"\u219D",RightTee:"\u22A2",RightTeeArrow:"\u21A6",RightTeeVector:"\u295B",rightthreetimes:"\u22CC",RightTriangle:"\u22B3",RightTriangleBar:"\u29D0",RightTriangleEqual:"\u22B5",RightUpDownVector:"\u294F",RightUpTeeVector:"\u295C",RightUpVector:"\u21BE",RightUpVectorBar:"\u2954",RightVector:"\u21C0",RightVectorBar:"\u2953",ring:"\u02DA",risingdotseq:"\u2253",rlarr:"\u21C4",rlhar:"\u21CC",rlm:"\u200F",rmoust:"\u23B1",rmoustache:"\u23B1",rnmid:"\u2AEE",roang:"\u27ED",roarr:"\u21FE",robrk:"\u27E7",ropar:"\u2986",Ropf:"\u211D",ropf:"\u{1D563}",roplus:"\u2A2E",rotimes:"\u2A35",RoundImplies:"\u2970",rpar:")",rpargt:"\u2994",rppolint:"\u2A12",rrarr:"\u21C9",Rrightarrow:"\u21DB",rsaquo:"\u203A",Rscr:"\u211B",rscr:"\u{1D4C7}",Rsh:"\u21B1",rsh:"\u21B1",rsqb:"]",rsquo:"\u2019",rsquor:"\u2019",rthree:"\u22CC",rtimes:"\u22CA",rtri:"\u25B9",rtrie:"\u22B5",rtrif:"\u25B8",rtriltri:"\u29CE",RuleDelayed:"\u29F4",ruluhar:"\u2968",rx:"\u211E",Sacute:"\u015A",sacute:"\u015B",sbquo:"\u201A",Sc:"\u2ABC",sc:"\u227B",scap:"\u2AB8",Scaron:"\u0160",scaron:"\u0161",sccue:"\u227D",scE:"\u2AB4",sce:"\u2AB0",Scedil:"\u015E",scedil:"\u015F",Scirc:"\u015C",scirc:"\u015D",scnap:"\u2ABA",scnE:"\u2AB6",scnsim:"\u22E9",scpolint:"\u2A13",scsim:"\u227F",Scy:"\u0421",scy:"\u0441",sdot:"\u22C5",sdotb:"\u22A1",sdote:"\u2A66",searhk:"\u2925",seArr:"\u21D8",searr:"\u2198",searrow:"\u2198",sect:"\xA7",semi:";",seswar:"\u2929",setminus:"\u2216",setmn:"\u2216",sext:"\u2736",Sfr:"\u{1D516}",sfr:"\u{1D530}",sfrown:"\u2322",sharp:"\u266F",SHCHcy:"\u0429",shchcy:"\u0449",SHcy:"\u0428",shcy:"\u0448",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",shortmid:"\u2223",shortparallel:"\u2225",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",shy:"\xAD",Sigma:"\u03A3",sigma:"\u03C3",sigmaf:"\u03C2",sigmav:"\u03C2",sim:"\u223C",simdot:"\u2A6A",sime:"\u2243",simeq:"\u2243",simg:"\u2A9E",simgE:"\u2AA0",siml:"\u2A9D",simlE:"\u2A9F",simne:"\u2246",simplus:"\u2A24",simrarr:"\u2972",slarr:"\u2190",SmallCircle:"\u2218",smallsetminus:"\u2216",smashp:"\u2A33",smeparsl:"\u29E4",smid:"\u2223",smile:"\u2323",smt:"\u2AAA",smte:"\u2AAC",smtes:"\u2AAC\uFE00",SOFTcy:"\u042C",softcy:"\u044C",sol:"/",solb:"\u29C4",solbar:"\u233F",Sopf:"\u{1D54A}",sopf:"\u{1D564}",spades:"\u2660",spadesuit:"\u2660",spar:"\u2225",sqcap:"\u2293",sqcaps:"\u2293\uFE00",sqcup:"\u2294",sqcups:"\u2294\uFE00",Sqrt:"\u221A",sqsub:"\u228F",sqsube:"\u2291",sqsubset:"\u228F",sqsubseteq:"\u2291",sqsup:"\u2290",sqsupe:"\u2292",sqsupset:"\u2290",sqsupseteq:"\u2292",squ:"\u25A1",Square:"\u25A1",square:"\u25A1",SquareIntersection:"\u2293",SquareSubset:"\u228F",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",squarf:"\u25AA",squf:"\u25AA",srarr:"\u2192",Sscr:"\u{1D4AE}",sscr:"\u{1D4C8}",ssetmn:"\u2216",ssmile:"\u2323",sstarf:"\u22C6",Star:"\u22C6",star:"\u2606",starf:"\u2605",straightepsilon:"\u03F5",straightphi:"\u03D5",strns:"\xAF",Sub:"\u22D0",sub:"\u2282",subdot:"\u2ABD",subE:"\u2AC5",sube:"\u2286",subedot:"\u2AC3",submult:"\u2AC1",subnE:"\u2ACB",subne:"\u228A",subplus:"\u2ABF",subrarr:"\u2979",Subset:"\u22D0",subset:"\u2282",subseteq:"\u2286",subseteqq:"\u2AC5",SubsetEqual:"\u2286",subsetneq:"\u228A",subsetneqq:"\u2ACB",subsim:"\u2AC7",subsub:"\u2AD5",subsup:"\u2AD3",succ:"\u227B",succapprox:"\u2AB8",succcurlyeq:"\u227D",Succeeds:"\u227B",SucceedsEqual:"\u2AB0",SucceedsSlantEqual:"\u227D",SucceedsTilde:"\u227F",succeq:"\u2AB0",succnapprox:"\u2ABA",succneqq:"\u2AB6",succnsim:"\u22E9",succsim:"\u227F",SuchThat:"\u220B",Sum:"\u2211",sum:"\u2211",sung:"\u266A",Sup:"\u22D1",sup:"\u2283",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",supdot:"\u2ABE",supdsub:"\u2AD8",supE:"\u2AC6",supe:"\u2287",supedot:"\u2AC4",Superset:"\u2283",SupersetEqual:"\u2287",suphsol:"\u27C9",suphsub:"\u2AD7",suplarr:"\u297B",supmult:"\u2AC2",supnE:"\u2ACC",supne:"\u228B",supplus:"\u2AC0",Supset:"\u22D1",supset:"\u2283",supseteq:"\u2287",supseteqq:"\u2AC6",supsetneq:"\u228B",supsetneqq:"\u2ACC",supsim:"\u2AC8",supsub:"\u2AD4",supsup:"\u2AD6",swarhk:"\u2926",swArr:"\u21D9",swarr:"\u2199",swarrow:"\u2199",swnwar:"\u292A",szlig:"\xDF",Tab:" ",target:"\u2316",Tau:"\u03A4",tau:"\u03C4",tbrk:"\u23B4",Tcaron:"\u0164",tcaron:"\u0165",Tcedil:"\u0162",tcedil:"\u0163",Tcy:"\u0422",tcy:"\u0442",tdot:"\u20DB",telrec:"\u2315",Tfr:"\u{1D517}",tfr:"\u{1D531}",there4:"\u2234",Therefore:"\u2234",therefore:"\u2234",Theta:"\u0398",theta:"\u03B8",thetasym:"\u03D1",thetav:"\u03D1",thickapprox:"\u2248",thicksim:"\u223C",ThickSpace:"\u205F\u200A",thinsp:"\u2009",ThinSpace:"\u2009",thkap:"\u2248",thksim:"\u223C",THORN:"\xDE",thorn:"\xFE",Tilde:"\u223C",tilde:"\u02DC",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",times:"\xD7",timesb:"\u22A0",timesbar:"\u2A31",timesd:"\u2A30",tint:"\u222D",toea:"\u2928",top:"\u22A4",topbot:"\u2336",topcir:"\u2AF1",Topf:"\u{1D54B}",topf:"\u{1D565}",topfork:"\u2ADA",tosa:"\u2929",tprime:"\u2034",TRADE:"\u2122",trade:"\u2122",triangle:"\u25B5",triangledown:"\u25BF",triangleleft:"\u25C3",trianglelefteq:"\u22B4",triangleq:"\u225C",triangleright:"\u25B9",trianglerighteq:"\u22B5",tridot:"\u25EC",trie:"\u225C",triminus:"\u2A3A",TripleDot:"\u20DB",triplus:"\u2A39",trisb:"\u29CD",tritime:"\u2A3B",trpezium:"\u23E2",Tscr:"\u{1D4AF}",tscr:"\u{1D4C9}",TScy:"\u0426",tscy:"\u0446",TSHcy:"\u040B",tshcy:"\u045B",Tstrok:"\u0166",tstrok:"\u0167",twixt:"\u226C",twoheadleftarrow:"\u219E",twoheadrightarrow:"\u21A0",Uacute:"\xDA",uacute:"\xFA",Uarr:"\u219F",uArr:"\u21D1",uarr:"\u2191",Uarrocir:"\u2949",Ubrcy:"\u040E",ubrcy:"\u045E",Ubreve:"\u016C",ubreve:"\u016D",Ucirc:"\xDB",ucirc:"\xFB",Ucy:"\u0423",ucy:"\u0443",udarr:"\u21C5",Udblac:"\u0170",udblac:"\u0171",udhar:"\u296E",ufisht:"\u297E",Ufr:"\u{1D518}",ufr:"\u{1D532}",Ugrave:"\xD9",ugrave:"\xF9",uHar:"\u2963",uharl:"\u21BF",uharr:"\u21BE",uhblk:"\u2580",ulcorn:"\u231C",ulcorner:"\u231C",ulcrop:"\u230F",ultri:"\u25F8",Umacr:"\u016A",umacr:"\u016B",uml:"\xA8",UnderBar:"_",UnderBrace:"\u23DF",UnderBracket:"\u23B5",UnderParenthesis:"\u23DD",Union:"\u22C3",UnionPlus:"\u228E",Uogon:"\u0172",uogon:"\u0173",Uopf:"\u{1D54C}",uopf:"\u{1D566}",UpArrow:"\u2191",Uparrow:"\u21D1",uparrow:"\u2191",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21C5",UpDownArrow:"\u2195",Updownarrow:"\u21D5",updownarrow:"\u2195",UpEquilibrium:"\u296E",upharpoonleft:"\u21BF",upharpoonright:"\u21BE",uplus:"\u228E",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",Upsi:"\u03D2",upsi:"\u03C5",upsih:"\u03D2",Upsilon:"\u03A5",upsilon:"\u03C5",UpTee:"\u22A5",UpTeeArrow:"\u21A5",upuparrows:"\u21C8",urcorn:"\u231D",urcorner:"\u231D",urcrop:"\u230E",Uring:"\u016E",uring:"\u016F",urtri:"\u25F9",Uscr:"\u{1D4B0}",uscr:"\u{1D4CA}",utdot:"\u22F0",Utilde:"\u0168",utilde:"\u0169",utri:"\u25B5",utrif:"\u25B4",uuarr:"\u21C8",Uuml:"\xDC",uuml:"\xFC",uwangle:"\u29A7",vangrt:"\u299C",varepsilon:"\u03F5",varkappa:"\u03F0",varnothing:"\u2205",varphi:"\u03D5",varpi:"\u03D6",varpropto:"\u221D",vArr:"\u21D5",varr:"\u2195",varrho:"\u03F1",varsigma:"\u03C2",varsubsetneq:"\u228A\uFE00",varsubsetneqq:"\u2ACB\uFE00",varsupsetneq:"\u228B\uFE00",varsupsetneqq:"\u2ACC\uFE00",vartheta:"\u03D1",vartriangleleft:"\u22B2",vartriangleright:"\u22B3",Vbar:"\u2AEB",vBar:"\u2AE8",vBarv:"\u2AE9",Vcy:"\u0412",vcy:"\u0432",VDash:"\u22AB",Vdash:"\u22A9",vDash:"\u22A8",vdash:"\u22A2",Vdashl:"\u2AE6",Vee:"\u22C1",vee:"\u2228",veebar:"\u22BB",veeeq:"\u225A",vellip:"\u22EE",Verbar:"\u2016",verbar:"|",Vert:"\u2016",vert:"|",VerticalBar:"\u2223",VerticalLine:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",VeryThinSpace:"\u200A",Vfr:"\u{1D519}",vfr:"\u{1D533}",vltri:"\u22B2",vnsub:"\u2282\u20D2",vnsup:"\u2283\u20D2",Vopf:"\u{1D54D}",vopf:"\u{1D567}",vprop:"\u221D",vrtri:"\u22B3",Vscr:"\u{1D4B1}",vscr:"\u{1D4CB}",vsubnE:"\u2ACB\uFE00",vsubne:"\u228A\uFE00",vsupnE:"\u2ACC\uFE00",vsupne:"\u228B\uFE00",Vvdash:"\u22AA",vzigzag:"\u299A",Wcirc:"\u0174",wcirc:"\u0175",wedbar:"\u2A5F",Wedge:"\u22C0",wedge:"\u2227",wedgeq:"\u2259",weierp:"\u2118",Wfr:"\u{1D51A}",wfr:"\u{1D534}",Wopf:"\u{1D54E}",wopf:"\u{1D568}",wp:"\u2118",wr:"\u2240",wreath:"\u2240",Wscr:"\u{1D4B2}",wscr:"\u{1D4CC}",xcap:"\u22C2",xcirc:"\u25EF",xcup:"\u22C3",xdtri:"\u25BD",Xfr:"\u{1D51B}",xfr:"\u{1D535}",xhArr:"\u27FA",xharr:"\u27F7",Xi:"\u039E",xi:"\u03BE",xlArr:"\u27F8",xlarr:"\u27F5",xmap:"\u27FC",xnis:"\u22FB",xodot:"\u2A00",Xopf:"\u{1D54F}",xopf:"\u{1D569}",xoplus:"\u2A01",xotime:"\u2A02",xrArr:"\u27F9",xrarr:"\u27F6",Xscr:"\u{1D4B3}",xscr:"\u{1D4CD}",xsqcup:"\u2A06",xuplus:"\u2A04",xutri:"\u25B3",xvee:"\u22C1",xwedge:"\u22C0",Yacute:"\xDD",yacute:"\xFD",YAcy:"\u042F",yacy:"\u044F",Ycirc:"\u0176",ycirc:"\u0177",Ycy:"\u042B",ycy:"\u044B",yen:"\xA5",Yfr:"\u{1D51C}",yfr:"\u{1D536}",YIcy:"\u0407",yicy:"\u0457",Yopf:"\u{1D550}",yopf:"\u{1D56A}",Yscr:"\u{1D4B4}",yscr:"\u{1D4CE}",YUcy:"\u042E",yucy:"\u044E",Yuml:"\u0178",yuml:"\xFF",Zacute:"\u0179",zacute:"\u017A",Zcaron:"\u017D",zcaron:"\u017E",Zcy:"\u0417",zcy:"\u0437",Zdot:"\u017B",zdot:"\u017C",zeetrf:"\u2128",ZeroWidthSpace:"\u200B",Zeta:"\u0396",zeta:"\u03B6",Zfr:"\u2128",zfr:"\u{1D537}",ZHcy:"\u0416",zhcy:"\u0436",zigrarr:"\u21DD",Zopf:"\u2124",zopf:"\u{1D56B}",Zscr:"\u{1D4B5}",zscr:"\u{1D4CF}",zwj:"\u200D",zwnj:"\u200C"});Ar.entityMap=Ar.HTML_ENTITIES});var Xs=Ke(kn=>{"use strict";var Gt=wt(),I=Aa(),zs=gr(),md=Gt.isHTMLEscapableRawTextElement,gd=Gt.isHTMLMimeType,bd=Gt.isHTMLRawTextElement,Cr=Gt.hasOwn,Us=Gt.NAMESPACE,_d=zs.ParseError,wd=zs.DOMException,zt=0,ct=1,Vt=2,Dr=3,Ht=4,Wt=5,Tr=6,En=7;function Vs(){}Vs.prototype={parse:function(r,e,t){var n=this.domBuilder;n.startDocument(),Ed(e,e=Object.create(null)),yd(r,e,t,n,this.errorHandler),n.endDocument()}};var La=/&#?\w+;?/g;function yd(r,e,t,n,a){var i=gd(n.mimeType);r.indexOf(I.UNICODE_REPLACEMENT_CHARACTER)>=0&&a.warning("Unicode replacement character detected, source encoding issues?");function s(F){if(F>65535){F-=65536;var ke=55296+(F>>10),zr=56320+(F&1023);return String.fromCharCode(ke,zr)}else return String.fromCharCode(F)}function o(F){var ke=F[F.length-1]===";"?F:F+";";if(!i&&ke!==F)return a.error("EntityRef: expecting ;"),F;var zr=I.Reference.exec(ke);if(!zr||zr[0].length!==ke.length)return a.error("entity not matching Reference production: "+F),F;var Vr=ke.slice(1,-1);return Cr(t,Vr)?t[Vr]:Vr.charAt(0)==="#"?s(parseInt(Vr.substring(1).replace("x","0x"))):(a.error("entity not found:"+F),F)}function l(F){if(F>g){var ke=r.substring(g,F).replace(La,o);f&&p(g),n.characters(ke,0,F-g),g=F}}var u=0,c=0,d=/\r\n?|\n|$/g,f=n.locator;function p(F,ke){for(;F>=c&&(ke=d.exec(r));)u=c,c=ke.index+ke[0].length,f.lineNumber++;f.columnNumber=F-u+1}for(var h=[{currentNSMap:e}],m=[],g=0;;){try{var b=r.indexOf("<",g);if(b<0){if(!i&&m.length>0)return a.fatalError("unclosed xml tag(s): "+m.join(", "));if(!r.substring(g).match(/^\s*$/)){var y=n.doc,v=y.createTextNode(r.substring(g));if(y.documentElement)return a.error("Extra content at the end of the document");y.appendChild(v),n.currentElement=v}return}if(b>g){var w=r.substring(g,b);!i&&m.length===0&&(w=w.replace(new RegExp(I.S_OPT.source,"g"),""),w&&a.error("Unexpected content outside root element: '"+w+"'")),l(b)}switch(r.charAt(b+1)){case"/":var B=r.indexOf(">",b+2),D=r.substring(b+2,B>0?B:void 0);if(!D)return a.fatalError("end tag name missing");var A=I.reg("^",I.QName_group,I.S_OPT,"$"),$=B>0&&A.exec(D);if(!$){var R=B>0&&I.reg("^",I.QName_group).exec(D);if(i&&R)a.warning('end tag name contains invalid trailing characters: "'+D+'"'),$=R;else if(R&&new RegExp(A.source,A.flags+"m").test(D))a.error('end tag name is followed by a line break and trailing content: "'+D+'"'),$=R;else return a.fatalError('end tag name contains invalid characters: "'+D+'"')}if(!n.currentElement&&!n.doc.documentElement)return;var z=m[m.length-1]||n.currentElement.tagName||n.doc.documentElement.tagName||"";if(z!==$[1]){var me=$[1].toLowerCase();if(!i||z.toLowerCase()!==me)return a.fatalError('Opening and ending tag mismatch: "'+z+'" != "'+D+'"')}var M=h.pop();m.pop();var V=M.localNSMap;if(n.endElement(M.uri,M.localName,z),V)for(var te in V)Cr(V,te)&&n.endPrefixMapping(te);B++;break;case"?":f&&p(b),B=Ad(r,b,n,a);break;case"!":f&&p(b),B=Ws(r,b,n,a,i);break;default:f&&p(b);var U=new Gs,Q=h[h.length-1].currentNSMap,B=vd(r,b,U,Q,o,a,i),fi=U.length;if(U.closed||(i&&Gt.isHTMLVoidElement(U.tagName)?U.closed=!0:m.push(U.tagName)),f&&fi){for(var ul=qs(f,{}),Xn=0;Xn<fi;Xn++){var pi=U[Xn];p(pi.offset),pi.locator=qs(f,{})}n.locator=ul,js(U,n,Q)&&h.push(U),n.locator=f}else js(U,n,Q)&&h.push(U);i&&!U.closed?B=xd(r,B,U.tagName,o,n):B++}}catch(F){if(F instanceof _d)throw F;if(F instanceof wd)return a.fatalError("Error constructing the DOM: "+F.name+": "+F.message,F);a.error("element parse error: "+F),B=-1}B>g?g=B:l(Math.max(b,g)+1)}}function qs(r,e){return e.lineNumber=r.lineNumber,e.columnNumber=r.columnNumber,e}function vd(r,e,t,n,a,i,s){function o(p,h,m){if(Cr(t.attributeNames,p))return i.fatalError("Attribute "+p+" redefined");if(!s&&h.indexOf("<")>=0)return i.fatalError("Unescaped '<' not allowed in attributes values");t.addValue(p,h.replace(/[\t\n\r]/g," ").replace(La,a),m)}for(var l,u,c=++e,d=zt;;){var f=r.charAt(c);if(d===zt&&f==="<")throw new Error("unexpected < in tag name: "+r.slice(e,c));switch(f){case"=":if(d===ct)l=r.slice(e,c),d=Dr;else if(d===Vt)d=Dr;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(d===Dr||d===ct)if(d===ct&&(i.warning('attribute value must after "="'),l=r.slice(e,c)),e=c+1,c=r.indexOf(f,e),c>0)u=r.slice(e,c),o(l,u,e-1),d=Wt;else throw new Error("attribute value no end '"+f+"' match");else if(d==Ht)u=r.slice(e,c),o(l,u,e),i.warning('attribute "'+l+'" missed start quot('+f+")!!"),e=c+1,d=Wt;else throw new Error('attribute value must after "="');break;case"/":switch(d){case zt:t.setTagName(r.slice(e,c));case Wt:case Tr:case En:d=En,t.closed=!0;case Ht:case ct:break;case Vt:t.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return i.error("unexpected end of input"),d==zt&&t.setTagName(r.slice(e,c)),c;case">":switch(d){case zt:t.setTagName(r.slice(e,c));case Wt:case Tr:case En:break;case Ht:case ct:u=r.slice(e,c),u.slice(-1)==="/"&&(t.closed=!0,u=u.slice(0,-1));case Vt:d===Vt&&(u=l),d==Ht?(i.warning('attribute "'+u+'" missed quot(")!'),o(l,u,e)):(s||i.warning('attribute "'+u+'" missed value!! "'+u+'" instead!!'),o(u,u,e));break;case Dr:if(!s)return i.fatalError(`AttValue: ' or " expected`)}return c;case"\x80":f=" ";default:if(f<=" ")switch(d){case zt:t.setTagName(r.slice(e,c)),d=Tr;break;case ct:l=r.slice(e,c),d=Vt;break;case Ht:var u=r.slice(e,c);i.warning('attribute "'+u+'" missed quot(")!!'),o(l,u,e);case Wt:d=Tr;break}else switch(d){case Vt:s||i.warning('attribute "'+l+'" missed value!! "'+l+'" instead2!!'),o(l,l,e),e=c,d=ct;break;case Wt:i.warning('attribute space is required"'+l+'"!!');case Tr:d=ct,e=c;break;case Dr:d=Ht,e=c;break;case En:throw new Error("elements closed character '/' and '>' must be connected to")}}c++}}function js(r,e,t){for(var n=r.tagName,a=null,d=r.length;d--;){var i=r[d],s=i.qName,o=i.value,f=s.indexOf(":");if(f>0)var l=i.prefix=s.slice(0,f),u=s.slice(f+1),c=l==="xmlns"&&u;else u=s,l=null,c=s==="xmlns"&&"";i.localName=u,c!==!1&&(a==null&&(a=Object.create(null),t=Object.create(t)),t[c]=a[c]=o,i.uri=Us.XMLNS,e.startPrefixMapping(c,o))}for(var d=r.length;d--;)i=r[d],i.prefix&&(i.prefix==="xml"&&(i.uri=Us.XML),i.prefix!=="xmlns"&&(i.uri=t[i.prefix]));var f=n.indexOf(":");f>0?(l=r.prefix=n.slice(0,f),u=r.localName=n.slice(f+1)):(l=null,u=r.localName=n);var p=r.uri=t[l||""];if(e.startElement(p,u,n,r),r.closed){if(e.endElement(p,u,n),a)for(l in a)Cr(a,l)&&e.endPrefixMapping(l)}else return r.currentNSMap=t,r.localNSMap=a,!0}function xd(r,e,t,n,a){var i=md(t);if(i||bd(t)){var s=new RegExp("</"+t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")+">","ig");s.lastIndex=e;var o=s.exec(r),l=o?o.index:-1;if(l<0)return e+1;var u=r.substring(e+1,l);return i&&(u=u.replace(La,n)),a.characters(u,0,u.length),l}return e+1}function Ed(r,e){for(var t in r)Cr(r,t)&&(e[t]=r[t])}function Hs(r,e){var t=e;function n(c){return c=c||0,r.charAt(t+c)}function a(c){c=c||1,t+=c}function i(){for(var c=0;t<r.length;){var d=n();if(d!==" "&&d!==`
|
|
3
|
-
`&&d!==" "&&d!=="\r")return c;c++,
|
|
1
|
+
var fl=Object.create;var Zn=Object.defineProperty;var pl=Object.getOwnPropertyDescriptor;var hl=Object.getOwnPropertyNames;var ml=Object.getPrototypeOf,gl=Object.prototype.hasOwnProperty;var Ke=(r,e)=>()=>{try{return e||r((e={exports:{}}).exports,e),e.exports}catch(t){throw e=0,t}},ga=(r,e)=>{for(var t in e)Zn(r,t,{get:e[t],enumerable:!0})},Yn=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of hl(e))!gl.call(r,i)&&i!==t&&Zn(r,i,{get:()=>e[i],enumerable:!(n=pl(e,i))||n.enumerable});return r},nr=(r,e,t)=>(Yn(r,e,"default"),t&&Yn(t,e,"default")),ba=(r,e,t)=>(t=r!=null?fl(ml(r)):{},Yn(e||!r||!r.__esModule?Zn(t,"default",{value:r,enumerable:!0}):t,r));var wt=Ke(ce=>{"use strict";function qu(r,e,t){if(t===void 0&&(t=Array.prototype),r&&typeof t.find=="function")return t.find.call(r,e);for(var n=0;n<r.length;n++)if(_t(r,n)){var i=r[n];if(e.call(void 0,i,n,r))return i}}function Ot(r,e){return e===void 0&&(e=Object),e&&typeof e.getOwnPropertyDescriptors=="function"&&(r=e.create(null,e.getOwnPropertyDescriptors(r))),e&&typeof e.freeze=="function"?e.freeze(r):r}function _t(r,e){return Object.prototype.hasOwnProperty.call(r,e)}function ju(r,e){if(r===null||typeof r!="object")throw new TypeError("target is not an object");for(var t in e)_t(e,t)&&(r[t]=e[t]);return r}var es=Ot({allowfullscreen:!0,async:!0,autofocus:!0,autoplay:!0,checked:!0,controls:!0,default:!0,defer:!0,disabled:!0,formnovalidate:!0,hidden:!0,ismap:!0,itemscope:!0,loop:!0,multiple:!0,muted:!0,nomodule:!0,novalidate:!0,open:!0,playsinline:!0,readonly:!0,required:!0,reversed:!0,selected:!0});function zu(r){return _t(es,r.toLowerCase())}var ts=Ot({area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Vu(r){return _t(ts,r.toLowerCase())}var dr=Ot({script:!1,style:!1,textarea:!0,title:!0});function Hu(r){var e=r.toLowerCase();return _t(dr,e)&&!dr[e]}function Wu(r){var e=r.toLowerCase();return _t(dr,e)&&dr[e]}function rs(r){return r===fr.HTML}function Gu(r){return rs(r)||r===fr.XML_XHTML_APPLICATION}var fr=Ot({HTML:"text/html",XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),Xu=Object.keys(fr).map(function(r){return fr[r]});function Yu(r){return Xu.indexOf(r)>-1}var Zu=Ot({HTML:"http://www.w3.org/1999/xhtml",SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});ce.assign=ju;ce.find=qu;ce.freeze=Ot;ce.HTML_BOOLEAN_ATTRIBUTES=es;ce.HTML_RAW_TEXT_ELEMENTS=dr;ce.HTML_VOID_ELEMENTS=ts;ce.hasDefaultHTMLNamespace=Gu;ce.hasOwn=_t;ce.isHTMLBooleanAttribute=zu;ce.isHTMLRawTextElement=Hu;ce.isHTMLEscapableRawTextElement=Wu;ce.isHTMLMimeType=rs;ce.isHTMLVoidElement=Vu;ce.isValidMimeType=Yu;ce.MIME_TYPE=fr;ce.NAMESPACE=Zu});var br=Ke(gr=>{"use strict";var Ju=wt();function is(r,e){r.prototype=Object.create(Error.prototype,{constructor:{value:r},name:{value:r.name,enumerable:!0,writable:e}})}var hr=Ju.freeze({Error:"Error",IndexSizeError:"IndexSizeError",DomstringSizeError:"DomstringSizeError",HierarchyRequestError:"HierarchyRequestError",WrongDocumentError:"WrongDocumentError",InvalidCharacterError:"InvalidCharacterError",NoDataAllowedError:"NoDataAllowedError",NoModificationAllowedError:"NoModificationAllowedError",NotFoundError:"NotFoundError",NotSupportedError:"NotSupportedError",InUseAttributeError:"InUseAttributeError",InvalidStateError:"InvalidStateError",SyntaxError:"SyntaxError",InvalidModificationError:"InvalidModificationError",NamespaceError:"NamespaceError",InvalidAccessError:"InvalidAccessError",ValidationError:"ValidationError",TypeMismatchError:"TypeMismatchError",SecurityError:"SecurityError",NetworkError:"NetworkError",AbortError:"AbortError",URLMismatchError:"URLMismatchError",QuotaExceededError:"QuotaExceededError",TimeoutError:"TimeoutError",InvalidNodeTypeError:"InvalidNodeTypeError",DataCloneError:"DataCloneError",EncodingError:"EncodingError",NotReadableError:"NotReadableError",UnknownError:"UnknownError",ConstraintError:"ConstraintError",DataError:"DataError",TransactionInactiveError:"TransactionInactiveError",ReadOnlyError:"ReadOnlyError",VersionError:"VersionError",OperationError:"OperationError",NotAllowedError:"NotAllowedError",OptOutError:"OptOutError"}),as=Object.keys(hr);function ss(r){return typeof r=="number"&&r>=1&&r<=25}function Ku(r){return typeof r=="string"&&r.substring(r.length-hr.Error.length)===hr.Error}function mr(r,e){ss(r)?(this.name=as[r],this.message=e||""):(this.message=r,this.name=Ku(e)?e:hr.Error),Error.captureStackTrace&&Error.captureStackTrace(this,mr)}is(mr,!0);Object.defineProperties(mr.prototype,{code:{enumerable:!0,get:function(){var r=as.indexOf(this.name);return ss(r)?r:0}}});var os={INDEX_SIZE_ERR:1,DOMSTRING_SIZE_ERR:2,HIERARCHY_REQUEST_ERR:3,WRONG_DOCUMENT_ERR:4,INVALID_CHARACTER_ERR:5,NO_DATA_ALLOWED_ERR:6,NO_MODIFICATION_ALLOWED_ERR:7,NOT_FOUND_ERR:8,NOT_SUPPORTED_ERR:9,INUSE_ATTRIBUTE_ERR:10,INVALID_STATE_ERR:11,SYNTAX_ERR:12,INVALID_MODIFICATION_ERR:13,NAMESPACE_ERR:14,INVALID_ACCESS_ERR:15,VALIDATION_ERR:16,TYPE_MISMATCH_ERR:17,SECURITY_ERR:18,NETWORK_ERR:19,ABORT_ERR:20,URL_MISMATCH_ERR:21,QUOTA_EXCEEDED_ERR:22,TIMEOUT_ERR:23,INVALID_NODE_TYPE_ERR:24,DATA_CLONE_ERR:25},wi=Object.entries(os);for(pr=0;pr<wi.length;pr++)ns=wi[pr][0],mr[ns]=wi[pr][1];var ns,pr;function yi(r,e,t){this.message=r,this.locator=e,this.cause=t,Error.captureStackTrace&&Error.captureStackTrace(this,yi)}is(yi);gr.DOMException=mr;gr.DOMExceptionName=hr;gr.ExceptionCode=os;gr.ParseError=yi});var Ti=Ke(S=>{"use strict";function ps(r){try{typeof r!="function"&&(r=RegExp);var e=new r("\u{1D306}","u").exec("\u{1D306}");return!!e&&e[0].length===2}catch{}return!1}var Lt=ps();function at(r){if(r.source[0]!=="[")throw new Error(r+" can not be used with chars");return r.source.slice(1,r.source.lastIndexOf("]"))}function Mt(r,e){if(r.source[0]!=="[")throw new Error("/"+r.source+"/ can not be used with chars_without");if(!e||typeof e!="string")throw new Error(JSON.stringify(e)+" is not a valid search");if(r.source.indexOf(e)===-1)throw new Error('"'+e+'" is not is /'+r.source+"/");if(e==="-"&&r.source.indexOf(e)!==1)throw new Error('"'+e+'" is not at the first postion of /'+r.source+"/");return new RegExp(r.source.replace(e,""),Lt?"u":"")}function O(r){var e=this;return new RegExp(Array.prototype.slice.call(arguments).map(function(t){var n=typeof t=="string";if(n&&e===void 0&&t==="|")throw new Error("use regg instead of reg to wrap expressions with `|`!");return n?t:t.source}).join(""),Lt?"u":"")}function C(r){if(arguments.length===0)throw new Error("no parameters provided");return O.apply(C,["(?:"].concat(Array.prototype.slice.call(arguments),[")"]))}var Qu="\uFFFD",st=/[-\x09\x0A\x0D\x20-\x2C\x2E-\uD7FF\uE000-\uFFFD]/;Lt&&(st=O("[",at(st),"\\u{10000}-\\u{10FFFF}","]"));var ec=new RegExp("[^"+at(st)+"]",Lt?"u":""),dn=/[\x20\x09\x0D\x0A]/,tc=at(dn),z=O(dn,"+"),G=O(dn,"*"),_r=/[:_a-zA-Z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/;Lt&&(_r=O("[",at(_r),"\\u{10000}-\\u{10FFFF}","]"));var rc=at(_r),Ei=O("[",rc,at(/[-.0-9\xB7]/),at(/[\u0300-\u036F\u203F-\u2040]/),"]"),xe=O(_r,Ei,"*"),nc=O("^",xe,"$"),ls=O(Ei,"+"),ic=O("&",xe,";"),ac=C(/&#[0-9]+;|&#x[0-9a-fA-F]+;/),wr=C(ic,"|",ac),yr=O("%",xe,";"),ki=C(O('"',C(/[^%&"]/,"|",yr,"|",wr),"*",'"'),"|",O("'",C(/[^%&']/,"|",yr,"|",wr),"*","'")),sc=C('"',C(/[^<&"]/,"|",wr),"*",'"',"|","'",C(/[^<&']/,"|",wr),"*","'"),oc=Mt(_r,":"),lc=Mt(Ei,":"),vi=O(oc,lc,"*"),uc=O("^",vi,"$"),vr=O(vi,C(":",vi),"?"),cc=O("^",vr,"$"),dc=O("(",vr,")"),Rt=C(/"[^"]*"|'[^']*'/),fc=O(/^<\?/,"(",xe,")",C(z,"(?!",dn,")(",st,"*?)"),"?",/\?>/),us=/[\x20\x0D\x0Aa-zA-Z0-9-'()+,./:=?;!*#@$_%]/,xr=C('"',us,'*"',"|","'",Mt(us,"'"),"*'"),hs="<!--",ms="-->",pc=O(hs,C(Mt(st,"-"),"|",O("-",Mt(st,"-"))),"*",ms),cs="#PCDATA",hc=C(O(/\(/,G,cs,C(G,/\|/,G,vr),"*",G,/\)\*/),"|",O(/\(/,G,cs,G,/\)/)),mc=/[?*+]?/,gc=O(/\([^>]+\)/,mc),bc=C("EMPTY","|","ANY","|",hc,"|",gc),_c="<!ELEMENT",wc=O(_c,z,C(vr,"|",yr),z,C(bc,"|",yr),G,">"),yc=O("NOTATION",z,/\(/,G,xe,C(G,/\|/,G,xe),"*",G,/\)/),vc=O(/\(/,G,ls,C(G,/\|/,G,ls),"*",G,/\)/),xc=C(yc,"|",vc),Ec=C(/CDATA|ID|IDREF|IDREFS|ENTITY|ENTITIES|NMTOKEN|NMTOKENS/,"|",xc),kc=C(/#REQUIRED|#IMPLIED/,"|",C(C("#FIXED",z),"?",sc)),Ac=C(z,xe,z,Ec,z,kc),Dc="<!ATTLIST",Tc=O(Dc,z,xe,Ac,"*",G,">"),xi="about:legacy-compat",Cc=C('"'+xi+'"',"|","'"+xi+"'"),Ai="SYSTEM",fn="PUBLIC",pn=C(C(Ai,z,Rt),"|",C(fn,z,xr,z,Rt)),Nc=O("^",C(C(Ai,z,"(?<SystemLiteralOnly>",Rt,")"),"|",C(fn,z,"(?<PubidLiteral>",xr,")",z,"(?<SystemLiteral>",Rt,")"))),Sc=O("^",xr,"$"),Ic=O("^",Rt,"$"),Bc=C(z,"NDATA",z,xe),Oc=C(ki,"|",C(pn,Bc,"?")),gs="<!ENTITY",Mc=O(gs,z,xe,z,Oc,G,">"),Rc=C(ki,"|",pn),Lc=O(gs,z,"%",z,xe,z,Rc,G,">"),Pc=C(Mc,"|",Lc),$c=O(fn,z,xr),Fc=O("<!NOTATION",z,xe,z,C(pn,"|",$c),G,">"),Di=O(G,"=",G),ds=/1[.]\d+/,Uc=O(z,"version",Di,C("'",ds,"'","|",'"',ds,'"')),fs=/[A-Za-z][-A-Za-z0-9._]*/,qc=C(z,"encoding",Di,C('"',fs,'"',"|","'",fs,"'")),jc=C(z,"standalone",Di,C("'",C("yes","|","no"),"'","|",'"',C("yes","|","no"),'"')),zc=O(/^<\?xml/,Uc,qc,"?",jc,"?",G,/\?>/),Vc="<!DOCTYPE",Hc="<![CDATA[",Wc="]]>",Gc=/<!\[CDATA\[/,Xc=/\]\]>/,Yc=O(st,"*?",Xc),Zc=O(Gc,Yc);S.chars=at;S.chars_without=Mt;S.detectUnicodeSupport=ps;S.reg=O;S.regg=C;S.ABOUT_LEGACY_COMPAT=xi;S.ABOUT_LEGACY_COMPAT_SystemLiteral=Cc;S.AttlistDecl=Tc;S.CDATA_START=Hc;S.CDATA_END=Wc;S.CDSect=Zc;S.Char=st;S.Comment=pc;S.COMMENT_START=hs;S.COMMENT_END=ms;S.DOCTYPE_DECL_START=Vc;S.elementdecl=wc;S.EntityDecl=Pc;S.EntityValue=ki;S.ExternalID=pn;S.ExternalID_match=Nc;S.Name=xe;S.Name_exact=nc;S.NCName_exact=uc;S.NotationDecl=Fc;S.Reference=wr;S.PEReference=yr;S.PI=fc;S.PUBLIC=fn;S.PubidLiteral=xr;S.PubidLiteral_match=Sc;S.QName=vr;S.QName_exact=cc;S.QName_group=dc;S.S=z;S.SChar_s=tc;S.S_OPT=G;S.SYSTEM=Ai;S.SystemLiteral=Rt;S.SystemLiteral_match=Ic;S.InvalidChar=ec;S.UNICODE_REPLACEMENT_CHARACTER=Qu;S.UNICODE_SUPPORT=Lt;S.XMLDecl=zc});var Pi=Ke(Z=>{"use strict";var De=wt(),Pe=De.find,Jc=De.hasDefaultHTMLNamespace,$t=De.hasOwn,Kc=De.isHTMLMimeType,Qc=De.isHTMLRawTextElement,ed=De.isHTMLVoidElement,Er=De.MIME_TYPE,$e=De.NAMESPACE,ge=Symbol(),Es=br(),x=Es.DOMException,he=Es.DOMExceptionName,Y=Ti();function _e(r){if(r!==ge)throw new TypeError("Illegal constructor")}function td(r){return r!==""}function rd(r){return r?r.split(/[\t\n\f\r ]+/).filter(td):[]}function nd(r,e){return $t(r,e)||(r[e]=!0),r}function bs(r){if(!r)return[];var e=rd(r);return Object.keys(e.reduce(nd,{}))}function id(r){return function(e){return r&&r.indexOf(e)!==-1}}function ks(r){if(!Y.QName_exact.test(r))throw new x(x.INVALID_CHARACTER_ERR,'invalid character in qualified name "'+r+'"')}function Ni(r,e){ks(e),r=r||null;var t=null,n=e;if(e.indexOf(":")>=0){var i=e.split(":");t=i[0],n=i[1]}if(t!==null&&r===null)throw new x(x.NAMESPACE_ERR,"prefix is non-null and namespace is null");if(t==="xml"&&r!==De.NAMESPACE.XML)throw new x(x.NAMESPACE_ERR,'prefix is "xml" and namespace is not the XML namespace');if((t==="xmlns"||e==="xmlns")&&r!==De.NAMESPACE.XMLNS)throw new x(x.NAMESPACE_ERR,'either qualifiedName or prefix is "xmlns" and namespace is not the XMLNS namespace');if(r===De.NAMESPACE.XMLNS&&t!=="xmlns"&&e!=="xmlns")throw new x(x.NAMESPACE_ERR,'namespace is the XMLNS namespace and neither qualifiedName nor prefix is "xmlns"');return[r,t,n]}function qt(r,e){for(var t in r)$t(r,t)&&(e[t]=r[t])}function we(r,e){var t=r.prototype;if(!(t instanceof e)){let n=function(){};n.prototype=e.prototype,n=new n,qt(t,n),r.prototype=t=n}t.constructor!=r&&(typeof r!="function"&&console.error("unknown Class:"+r),t.constructor=r)}var ye={},Ae=ye.ELEMENT_NODE=1,Ft=ye.ATTRIBUTE_NODE=2,kr=ye.TEXT_NODE=3,As=ye.CDATA_SECTION_NODE=4,Ds=ye.ENTITY_REFERENCE_NODE=5,ad=ye.ENTITY_NODE=6,Si=ye.PROCESSING_INSTRUCTION_NODE=7,Ii=ye.COMMENT_NODE=8,Pt=ye.DOCUMENT_NODE=9,Ts=ye.DOCUMENT_TYPE_NODE=10,ot=ye.DOCUMENT_FRAGMENT_NODE=11,sd=ye.NOTATION_NODE=12,X=De.freeze({DOCUMENT_POSITION_DISCONNECTED:1,DOCUMENT_POSITION_PRECEDING:2,DOCUMENT_POSITION_FOLLOWING:4,DOCUMENT_POSITION_CONTAINS:8,DOCUMENT_POSITION_CONTAINED_BY:16,DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:32});function Cs(r,e){if(e.length<r.length)return Cs(e,r);var t=null;for(var n in r){if(r[n]!==e[n])return t;t=r[n]}return t}function _s(r){return r.guid||(r.guid=Math.random()),r.guid}function ne(){}ne.prototype={length:0,item:function(r){return r>=0&&r<this.length?this[r]:null},toString:function(r){var e;typeof r=="function"?e={requireWellFormed:!1,splitCDATASections:!0,nodeFilter:r}:r?e={requireWellFormed:!!r.requireWellFormed,splitCDATASections:r.splitCDATASections!==!1,nodeFilter:r.nodeFilter||null}:e={requireWellFormed:!1,splitCDATASections:!0,nodeFilter:null};for(var t=[],n=0;n<this.length;n++)Li(this[n],t,null,e);return t.join("")},filter:function(r){return Array.prototype.filter.call(this,r)},indexOf:function(r){return Array.prototype.indexOf.call(this,r)}};ne.prototype[Symbol.iterator]=function(){var r=this,e=0;return{next:function(){return e<r.length?{value:r[e++],done:!1}:{done:!0}},return:function(){return{done:!0}}}};function Le(r,e){this._node=r,this._refresh=e,bn(this)}function bn(r){var e=r._node._inc||r._node.ownerDocument._inc;if(r._inc!==e){var t=r._refresh(r._node);if(Fs(r,"length",t.length),!r.$$length||t.length<r.$$length)for(var n=t.length;n in r;n++)$t(r,n)&&delete r[n];qt(t,r),r._inc=e}}Le.prototype.item=function(r){return bn(this),this[r]||null};we(Le,ne);function Ut(){this._nsIndex=Object.create(null),this._noNsIndex=Object.create(null)}function Ns(r,e){for(var t=0;t<r.length;){if(r[t]===e)return t;t++}}function Bi(r,e,t){if(!e)return r._noNsIndex;var n=r._nsIndex[e];return!n&&t&&(n=r._nsIndex[e]=Object.create(null)),n}function od(r,e,t){var n=Bi(r,e,!1),i=n&&n[t];return i||null}function ld(r,e){Bi(r,e.namespaceURI,!0)[e.localName]=e}function ud(r,e){var t=Bi(r,e.namespaceURI,!1);t&&delete t[e.localName]}function cd(r,e,t,n){if(n?e[Ns(e,n)]=t:(e[e.length]=t,e.length++),ld(e,t),r){t.ownerElement=r;var i=r.ownerDocument;i&&(n&&Bs(i,r,n),dd(i,r,t))}}function ws(r,e,t){var n=Ns(e,t);if(n>=0){for(var i=e.length-1;n<=i;)e[n]=e[++n];if(e.length=i,ud(e,t),r){var a=r.ownerDocument;a&&Bs(a,r,t),t.ownerElement=null}}}Ut.prototype={length:0,item:ne.prototype.item,getNamedItem:function(r){this._ownerElement&&this._ownerElement._isInHTMLDocumentAndNamespace()&&(r=r.toLowerCase());for(var e=0;e<this.length;){var t=this[e];if(t.nodeName===r)return t;e++}return null},setNamedItem:function(r){var e=r.ownerElement;if(e&&e!==this._ownerElement)throw new x(x.INUSE_ATTRIBUTE_ERR);var t=od(this,r.namespaceURI,r.localName);return t===r?r:(cd(this._ownerElement,this,r,t),t)},setNamedItemNS:function(r){return this.setNamedItem(r)},removeNamedItem:function(r){var e=this.getNamedItem(r);if(!e)throw new x(x.NOT_FOUND_ERR,r);return ws(this._ownerElement,this,e),e},removeNamedItemNS:function(r,e){var t=this.getNamedItemNS(r,e);if(!t)throw new x(x.NOT_FOUND_ERR,r?r+" : "+e:e);return ws(this._ownerElement,this,t),t},getNamedItemNS:function(r,e){r||(r=null);for(var t=0;t<this.length;){var n=this[t];if(n.localName===e&&n.namespaceURI===r)return n;t++}return null}};Ut.prototype[Symbol.iterator]=function(){var r=this,e=0;return{next:function(){return e<r.length?{value:r[e++],done:!1}:{done:!0}},return:function(){return{done:!0}}}};function Ss(){}Ss.prototype={hasFeature:function(r,e){return!0},createDocument:function(r,e,t){var n=Er.XML_APPLICATION;r===$e.HTML?n=Er.XML_XHTML_APPLICATION:r===$e.SVG&&(n=Er.XML_SVG_IMAGE);var i=new He(ge,{contentType:n});if(i.implementation=this,i.childNodes=new ne,i.doctype=t||null,t&&i.appendChild(t),e){var a=i.createElementNS(r,e);i.appendChild(a)}return i},createDocumentType:function(r,e,t,n){ks(r);var i=new yn(ge);return i.name=r,i.nodeName=r,i.publicId=e||"",i.systemId=t||"",i.internalSubset=n||"",i.childNodes=new ne,i},createHTMLDocument:function(r){var e=new He(ge,{contentType:Er.HTML});if(e.implementation=this,e.childNodes=new ne,r!==!1){e.doctype=this.createDocumentType("html"),e.doctype.ownerDocument=e,e.appendChild(e.doctype);var t=e.createElement("html");e.appendChild(t);var n=e.createElement("head");if(t.appendChild(n),typeof r=="string"){var i=e.createElement("title");i.appendChild(e.createTextNode(r)),n.appendChild(i)}t.appendChild(e.createElement("body"))}return e}};function L(r){_e(r)}L.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,parentNode:null,get parentElement(){return this.parentNode&&this.parentNode.nodeType===this.ELEMENT_NODE?this.parentNode:null},childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,baseURI:"about:blank",get isConnected(){var r=this.getRootNode();return r&&r.nodeType===r.DOCUMENT_NODE},contains:function(r){if(!r)return!1;var e=r;do{if(this===e)return!0;e=e.parentNode}while(e);return!1},getRootNode:function(r){var e=this;do{if(!e.parentNode)return e;e=e.parentNode}while(e)},isEqualNode:function(r){if(!r)return!1;for(var e=[{node:this,other:r}];e.length>0;){var t=e.pop(),n=t.node,i=t.other;if(n.nodeType!==i.nodeType)return!1;switch(n.nodeType){case n.DOCUMENT_TYPE_NODE:if(n.name!==i.name||n.publicId!==i.publicId||n.systemId!==i.systemId)return!1;break;case n.ELEMENT_NODE:if(n.namespaceURI!==i.namespaceURI||n.prefix!==i.prefix||n.localName!==i.localName||n.attributes.length!==i.attributes.length)return!1;for(var a=0;a<n.attributes.length;a++){var s=n.attributes.item(a),o=i.getAttributeNodeNS(s.namespaceURI,s.localName);if(!o)return!1;e.push({node:s,other:o})}break;case n.ATTRIBUTE_NODE:if(n.namespaceURI!==i.namespaceURI||n.localName!==i.localName||n.value!==i.value)return!1;break;case n.PROCESSING_INSTRUCTION_NODE:if(n.target!==i.target||n.data!==i.data)return!1;break;case n.TEXT_NODE:case n.CDATA_SECTION_NODE:case n.COMMENT_NODE:if(n.data!==i.data)return!1;break}if(n.childNodes.length!==i.childNodes.length)return!1;for(var a=n.childNodes.length-1;a>=0;a--)e.push({node:n.childNodes[a],other:i.childNodes[a]})}return!0},isSameNode:function(r){return this===r},insertBefore:function(r,e){return gn(this,r,e)},replaceChild:function(r,e){gn(this,r,e,Rs),e&&this.removeChild(e)},removeChild:function(r){return Os(this,r)},appendChild:function(r){return this.insertBefore(r,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(r){return $s(this.ownerDocument||this,this,r)},normalize:function(){de(this,null,{enter:function(r){for(var e=r.firstChild;e;){var t=e.nextSibling;if(t!==null&&t.nodeType===kr&&e.nodeType===kr){for(var n=[],i=t;i!==null&&i.nodeType===kr;)n.push(i.data),i=i.nextSibling;for(var a=e.nextSibling;a!==i;){var s=a.nextSibling;a.parentNode=null,a.previousSibling=null,a.nextSibling=null,a=s}e.nextSibling=i,i!==null?i.previousSibling=e:r.lastChild=e,e.appendData(n.join("")),Oi(r.ownerDocument,r),e=i}else e=t}return!0}})},isSupported:function(r,e){return this.ownerDocument.implementation.hasFeature(r,e)},lookupPrefix:function(r){for(var e=this;e;){var t=e._nsMap;if(t){for(var n in t)if($t(t,n)&&t[n]===r)return n}e=e.nodeType==Ft?e.ownerDocument:e.parentNode}return null},lookupNamespaceURI:function(r){for(var e=this;e;){var t=e._nsMap;if(t&&$t(t,r))return t[r];e=e.nodeType==Ft?e.ownerDocument:e.parentNode}return null},isDefaultNamespace:function(r){var e=this.lookupPrefix(r);return e==null},compareDocumentPosition:function(r){if(this===r)return 0;var e=r,t=this,n=null,i=null;if(e instanceof yt&&(n=e,e=n.ownerElement),t instanceof yt&&(i=t,t=i.ownerElement,n&&e&&t===e))for(var a=0,s;s=t.attributes[a];a++){if(s===n)return X.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+X.DOCUMENT_POSITION_PRECEDING;if(s===i)return X.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+X.DOCUMENT_POSITION_FOLLOWING}if(!e||!t||t.ownerDocument!==e.ownerDocument)return X.DOCUMENT_POSITION_DISCONNECTED+X.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+(_s(t.ownerDocument)>_s(e.ownerDocument)?X.DOCUMENT_POSITION_FOLLOWING:X.DOCUMENT_POSITION_PRECEDING);if(i&&e===t)return X.DOCUMENT_POSITION_CONTAINS+X.DOCUMENT_POSITION_PRECEDING;if(n&&e===t)return X.DOCUMENT_POSITION_CONTAINED_BY+X.DOCUMENT_POSITION_FOLLOWING;for(var o=[],l=e.parentNode;l;){if(!i&&l===t)return X.DOCUMENT_POSITION_CONTAINED_BY+X.DOCUMENT_POSITION_FOLLOWING;o.push(l),l=l.parentNode}o.reverse();for(var u=[],c=t.parentNode;c;){if(!n&&c===e)return X.DOCUMENT_POSITION_CONTAINS+X.DOCUMENT_POSITION_PRECEDING;u.push(c),c=c.parentNode}u.reverse();var d=Cs(o,u);for(var f in d.childNodes){var p=d.childNodes[f];if(p===t)return X.DOCUMENT_POSITION_FOLLOWING;if(p===e)return X.DOCUMENT_POSITION_PRECEDING;if(u.indexOf(p)>=0)return X.DOCUMENT_POSITION_FOLLOWING;if(o.indexOf(p)>=0)return X.DOCUMENT_POSITION_PRECEDING}return 0}};function Is(r){return r=="<"&&"<"||r==">"&&">"||r=="&"&&"&"||r=='"'&&"""||"&#"+r.charCodeAt()+";"}qt(ye,L);qt(ye,L.prototype);qt(X,L);qt(X,L.prototype);function mn(r,e){de(r,null,{enter:function(t){return e(t)?de.STOP:!0}})}function de(r,e,t){for(var n=[{node:r,context:e,phase:de.ENTER}];n.length>0;){var i=n.pop();if(i.phase===de.ENTER){var a=t.enter(i.node,i.context);if(a===de.STOP)return de.STOP;if(n.push({node:i.node,context:a,phase:de.EXIT}),a==null)continue;for(var s=i.node.lastChild;s;)n.push({node:s,context:a,phase:de.ENTER}),s=s.previousSibling}else t.exit&&t.exit(i.node,i.context)}}de.STOP=Symbol("walkDOM.STOP");de.ENTER=0;de.EXIT=1;function He(r,e){_e(r);var t=e||{};this.ownerDocument=this,this.contentType=t.contentType||Er.XML_APPLICATION,this.type=Kc(this.contentType)?"html":"xml"}function dd(r,e,t){r&&r._inc++;var n=t.namespaceURI;n===$e.XMLNS&&(e._nsMap[t.prefix?t.localName:""]=t.value)}function Bs(r,e,t,n){r&&r._inc++;var i=t.namespaceURI;i===$e.XMLNS&&delete e._nsMap[t.prefix?t.localName:""]}function Oi(r,e,t){if(r&&r._inc){r._inc++;var n=e.childNodes;if(t&&!t.nextSibling)n[n.length++]=t;else{for(var i=e.firstChild,a=0;i;)n[a++]=i,i=i.nextSibling;n.length=a,delete n[n.length]}}}function Os(r,e){if(r!==e.parentNode)throw new x(x.NOT_FOUND_ERR,"child's parent is not parent");var t=e.previousSibling,n=e.nextSibling;return t?t.nextSibling=n:r.firstChild=n,n?n.previousSibling=t:r.lastChild=t,Oi(r.ownerDocument,r),e.parentNode=null,e.previousSibling=null,e.nextSibling=null,e}function fd(r){return r&&(r.nodeType===L.DOCUMENT_NODE||r.nodeType===L.DOCUMENT_FRAGMENT_NODE||r.nodeType===L.ELEMENT_NODE)}function pd(r){return r&&(r.nodeType===L.CDATA_SECTION_NODE||r.nodeType===L.COMMENT_NODE||r.nodeType===L.DOCUMENT_FRAGMENT_NODE||r.nodeType===L.DOCUMENT_TYPE_NODE||r.nodeType===L.ELEMENT_NODE||r.nodeType===L.PROCESSING_INSTRUCTION_NODE||r.nodeType===L.TEXT_NODE)}function lt(r){return r&&r.nodeType===L.DOCUMENT_TYPE_NODE}function Ve(r){return r&&r.nodeType===L.ELEMENT_NODE}function Ms(r){return r&&r.nodeType===L.TEXT_NODE}function ys(r,e){var t=r.childNodes||[];if(Pe(t,Ve)||lt(e))return!1;var n=Pe(t,lt);return!(e&&n&&t.indexOf(n)>t.indexOf(e))}function vs(r,e){var t=r.childNodes||[];function n(a){return Ve(a)&&a!==e}if(Pe(t,n))return!1;var i=Pe(t,lt);return!(e&&i&&t.indexOf(i)>t.indexOf(e))}function hd(r,e,t){if(!fd(r))throw new x(x.HIERARCHY_REQUEST_ERR,"Unexpected parent node type "+r.nodeType);if(t&&t.parentNode!==r)throw new x(x.NOT_FOUND_ERR,"child not in parent");if(!pd(e)||lt(e)&&r.nodeType!==L.DOCUMENT_NODE)throw new x(x.HIERARCHY_REQUEST_ERR,"Unexpected node type "+e.nodeType+" for parent node type "+r.nodeType)}function md(r,e,t){var n=r.childNodes||[],i=e.childNodes||[];if(e.nodeType===L.DOCUMENT_FRAGMENT_NODE){var a=i.filter(Ve);if(a.length>1||Pe(i,Ms))throw new x(x.HIERARCHY_REQUEST_ERR,"More than one element or text in fragment");if(a.length===1&&!ys(r,t))throw new x(x.HIERARCHY_REQUEST_ERR,"Element in fragment can not be inserted before doctype")}if(Ve(e)&&!ys(r,t))throw new x(x.HIERARCHY_REQUEST_ERR,"Only one element can be added and only after doctype");if(lt(e)){if(Pe(n,lt))throw new x(x.HIERARCHY_REQUEST_ERR,"Only one doctype is allowed");var s=Pe(n,Ve);if(t&&n.indexOf(s)<n.indexOf(t))throw new x(x.HIERARCHY_REQUEST_ERR,"Doctype can only be inserted before an element");if(!t&&s)throw new x(x.HIERARCHY_REQUEST_ERR,"Doctype can not be appended since element is present")}}function Rs(r,e,t){var n=r.childNodes||[],i=e.childNodes||[];if(e.nodeType===L.DOCUMENT_FRAGMENT_NODE){var a=i.filter(Ve);if(a.length>1||Pe(i,Ms))throw new x(x.HIERARCHY_REQUEST_ERR,"More than one element or text in fragment");if(a.length===1&&!vs(r,t))throw new x(x.HIERARCHY_REQUEST_ERR,"Element in fragment can not be inserted before doctype")}if(Ve(e)&&!vs(r,t))throw new x(x.HIERARCHY_REQUEST_ERR,"Only one element can be added and only after doctype");if(lt(e)){if(Pe(n,function(l){return lt(l)&&l!==t}))throw new x(x.HIERARCHY_REQUEST_ERR,"Only one doctype is allowed");var s=Pe(n,Ve);if(t&&n.indexOf(s)<n.indexOf(t))throw new x(x.HIERARCHY_REQUEST_ERR,"Doctype can only be inserted before an element")}}function gn(r,e,t,n){hd(r,e,t),r.nodeType===L.DOCUMENT_NODE&&(n||md)(r,e,t);var i=e.parentNode;if(i&&i.removeChild(e),e.nodeType===ot){var a=e.firstChild;if(a==null)return e;var s=e.lastChild}else a=s=e;var o=t?t.previousSibling:r.lastChild;a.previousSibling=o,s.nextSibling=t,o?o.nextSibling=a:r.firstChild=a,t==null?r.lastChild=s:t.previousSibling=s;do a.parentNode=r;while(a!==s&&(a=a.nextSibling));return Oi(r.ownerDocument||r,r,e),e.nodeType==ot&&(e.firstChild=e.lastChild=null),e}He.prototype={implementation:null,nodeName:"#document",nodeType:Pt,doctype:null,documentElement:null,_inc:1,insertBefore:function(r,e){if(r.nodeType===ot){for(var t=r.firstChild;t;){var n=t.nextSibling;this.insertBefore(t,e),t=n}return r}return gn(this,r,e),r.ownerDocument=this,this.documentElement===null&&r.nodeType===Ae&&(this.documentElement=r),r},removeChild:function(r){var e=Os(this,r);return e===this.documentElement&&(this.documentElement=null),e},replaceChild:function(r,e){gn(this,r,e,Rs),r.ownerDocument=this,e&&this.removeChild(e),Ve(r)&&(this.documentElement=r)},importNode:function(r,e){return gd(this,r,e)},getElementById:function(r){var e=null;return mn(this.documentElement,function(t){if(t.nodeType==Ae&&t.getAttribute("id")==r)return e=t,!0}),e},createElement:function(r){var e=new We(ge);e.ownerDocument=this,this.type==="html"&&(r=r.toLowerCase()),Jc(this.contentType)&&(e.namespaceURI=$e.HTML),e.nodeName=r,e.tagName=r,e.localName=r,e.childNodes=new ne;var t=e.attributes=new Ut;return t._ownerElement=e,e},createDocumentFragment:function(){var r=new jt(ge);return r.ownerDocument=this,r.childNodes=new ne,r},createTextNode:function(r){var e=new Ar(ge);return e.ownerDocument=this,e.childNodes=new ne,e.appendData(r),e},createComment:function(r){var e=new _n(ge);return e.ownerDocument=this,e.childNodes=new ne,e.appendData(r),e},createCDATASection:function(r){if(r.indexOf("]]>")!==-1)throw new x(x.INVALID_CHARACTER_ERR,'data contains "]]>"');var e=new wn(ge);return e.ownerDocument=this,e.childNodes=new ne,e.appendData(r),e},createProcessingInstruction:function(r,e){var t=new xn(ge);return t.ownerDocument=this,t.childNodes=new ne,t.nodeName=t.target=r,t.nodeValue=t.data=e,t},createAttribute:function(r){if(!Y.QName_exact.test(r))throw new x(x.INVALID_CHARACTER_ERR,'invalid character in name "'+r+'"');return this.type==="html"&&(r=r.toLowerCase()),this._createAttribute(r)},_createAttribute:function(r){var e=new yt(ge);return e.ownerDocument=this,e.childNodes=new ne,e.name=r,e.nodeName=r,e.localName=r,e.specified=!0,e},createEntityReference:function(r){if(!Y.Name_exact.test(r))throw new x(x.INVALID_CHARACTER_ERR,'not a valid xml name "'+r+'"');if(this.type==="html")throw new x("document is an html document",he.NotSupportedError);var e=new vn(ge);return e.ownerDocument=this,e.childNodes=new ne,e.nodeName=r,e},createElementNS:function(r,e){var t=Ni(r,e),n=new We(ge),i=n.attributes=new Ut;return n.childNodes=new ne,n.ownerDocument=this,n.nodeName=e,n.tagName=e,n.namespaceURI=t[0],n.prefix=t[1],n.localName=t[2],i._ownerElement=n,n},createAttributeNS:function(r,e){var t=Ni(r,e),n=new yt(ge);return n.ownerDocument=this,n.childNodes=new ne,n.nodeName=e,n.name=e,n.specified=!0,n.namespaceURI=t[0],n.prefix=t[1],n.localName=t[2],n}};we(He,L);function We(r){_e(r),this._nsMap=Object.create(null)}We.prototype={nodeType:Ae,attributes:null,getQualifiedName:function(){return this.prefix?this.prefix+":"+this.localName:this.localName},_isInHTMLDocumentAndNamespace:function(){return this.ownerDocument.type==="html"&&this.namespaceURI===$e.HTML},hasAttributes:function(){return!!(this.attributes&&this.attributes.length)},hasAttribute:function(r){return!!this.getAttributeNode(r)},getAttribute:function(r){var e=this.getAttributeNode(r);return e?e.value:null},getAttributeNode:function(r){return this._isInHTMLDocumentAndNamespace()&&(r=r.toLowerCase()),this.attributes.getNamedItem(r)},setAttribute:function(r,e){this._isInHTMLDocumentAndNamespace()&&(r=r.toLowerCase());var t=this.getAttributeNode(r);t?t.value=t.nodeValue=""+e:(t=this.ownerDocument._createAttribute(r),t.value=t.nodeValue=""+e,this.setAttributeNode(t))},removeAttribute:function(r){var e=this.getAttributeNode(r);e&&this.removeAttributeNode(e)},setAttributeNode:function(r){return this.attributes.setNamedItem(r)},setAttributeNodeNS:function(r){return this.attributes.setNamedItemNS(r)},removeAttributeNode:function(r){return this.attributes.removeNamedItem(r.nodeName)},removeAttributeNS:function(r,e){var t=this.getAttributeNodeNS(r,e);t&&this.removeAttributeNode(t)},hasAttributeNS:function(r,e){return this.getAttributeNodeNS(r,e)!=null},getAttributeNS:function(r,e){var t=this.getAttributeNodeNS(r,e);return t?t.value:null},setAttributeNS:function(r,e,t){var n=Ni(r,e),i=n[2],a=this.getAttributeNodeNS(r,i);a?a.value=a.nodeValue=""+t:(a=this.ownerDocument.createAttributeNS(r,e),a.value=a.nodeValue=""+t,this.setAttributeNode(a))},getAttributeNodeNS:function(r,e){return this.attributes.getNamedItemNS(r,e)},getElementsByClassName:function(r){var e=bs(r);return new Le(this,function(t){var n=[];return e.length>0&&mn(t,function(i){if(i!==t&&i.nodeType===Ae){var a=i.getAttribute("class");if(a){var s=r===a;if(!s){var o=bs(a);s=e.every(id(o))}s&&n.push(i)}}}),n})},getElementsByTagName:function(r){var e=(this.nodeType===Pt?this:this.ownerDocument).type==="html",t=r.toLowerCase();return new Le(this,function(n){var i=[];return mn(n,function(a){if(!(a===n||a.nodeType!==Ae))if(r==="*")i.push(a);else{var s=a.getQualifiedName(),o=e&&a.namespaceURI===$e.HTML?t:r;s===o&&i.push(a)}}),i})},getElementsByTagNameNS:function(r,e){return new Le(this,function(t){var n=[];return mn(t,function(i){i!==t&&i.nodeType===Ae&&(r==="*"||i.namespaceURI===r)&&(e==="*"||i.localName==e)&&n.push(i)}),n})}};He.prototype.getElementsByClassName=We.prototype.getElementsByClassName;He.prototype.getElementsByTagName=We.prototype.getElementsByTagName;He.prototype.getElementsByTagNameNS=We.prototype.getElementsByTagNameNS;we(We,L);function yt(r){_e(r),this.namespaceURI=null,this.prefix=null,this.ownerElement=null}yt.prototype.nodeType=Ft;we(yt,L);function ut(r){_e(r)}ut.prototype={data:"",substringData:function(r,e){return this.data.substring(r,r+e)},appendData:function(r){r=this.data+r,this.nodeValue=this.data=r,this.length=r.length},insertData:function(r,e){this.replaceData(r,0,e)},deleteData:function(r,e){this.replaceData(r,e,"")},replaceData:function(r,e,t){var n=this.data.substring(0,r),i=this.data.substring(r+e);t=n+t+i,this.nodeValue=this.data=t,this.length=t.length}};we(ut,L);function Ar(r){_e(r)}Ar.prototype={nodeName:"#text",nodeType:kr,splitText:function(r){var e=this.data,t=e.substring(r);e=e.substring(0,r),this.data=this.nodeValue=e,this.length=e.length;var n=this.ownerDocument.createTextNode(t);return this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling),n}};we(Ar,ut);function _n(r){_e(r)}_n.prototype={nodeName:"#comment",nodeType:Ii};we(_n,ut);function wn(r){_e(r)}wn.prototype={nodeName:"#cdata-section",nodeType:As};we(wn,Ar);function yn(r){_e(r)}yn.prototype.nodeType=Ts;we(yn,L);function Mi(r){_e(r)}Mi.prototype.nodeType=sd;we(Mi,L);function Ri(r){_e(r)}Ri.prototype.nodeType=ad;we(Ri,L);function vn(r){_e(r)}vn.prototype.nodeType=Ds;we(vn,L);function jt(r){_e(r)}jt.prototype.nodeName="#document-fragment";jt.prototype.nodeType=ot;we(jt,L);function xn(r){_e(r)}xn.prototype.nodeType=Si;we(xn,ut);function Ls(){}Ls.prototype.serializeToString=function(r,e){return Ps.call(r,e)};L.prototype.toString=Ps;function Ps(r){var e;typeof r=="function"?e={requireWellFormed:!1,splitCDATASections:!0,nodeFilter:r}:r!=null?e={requireWellFormed:!!r.requireWellFormed,splitCDATASections:r.splitCDATASections!==!1,nodeFilter:r.nodeFilter||null}:e={requireWellFormed:!1,splitCDATASections:!0,nodeFilter:null};var t=[],n=this.nodeType===Pt&&this.documentElement||this,i=n.prefix,a=n.namespaceURI;if(a&&i==null){var i=n.lookupPrefix(a);if(i==null)var s=[{namespace:a,prefix:null}]}return Li(this,t,s,e),t.join("")}function xs(r,e,t){var n=r.prefix||"",i=r.namespaceURI;if(!i||n==="xml"&&i===$e.XML||i===$e.XMLNS)return!1;for(var a=t.length;a--;){var s=t[a];if(s.prefix===n)return s.namespace!==i}return!0}function hn(r,e,t,n){if(n&&!Y.QName_exact.test(e))throw new x('The attribute name "'+e+'" is not a valid XML QName',he.InvalidStateError);r.push(" ",e,'="',t.replace(/[<>&"\t\n\r]/g,Is),'"')}function Li(r,e,t,n){t||(t=[]);var i=n.nodeFilter,a=n.requireWellFormed,s=n.splitCDATASections,o=r.nodeType===Pt?r:r.ownerDocument,l=o.type==="html";de(r,{ns:t},{enter:function(u,c){var d=c.ns;if(i)if(u=i(u),u){if(typeof u=="string")return e.push(u),null}else return null;switch(u.nodeType){case Ae:var f=u.attributes,p=f.length,h=u.tagName,m=h;if(!l&&!u.prefix&&u.namespaceURI){for(var g,b=0;b<f.length;b++)if(f.item(b).name==="xmlns"){g=f.item(b).value;break}if(!g)for(var y=d.length-1;y>=0;y--){var v=d[y];if(v.prefix===""&&v.namespace===u.namespaceURI){g=v.namespace;break}}if(g!==u.namespaceURI)for(var y=d.length-1;y>=0;y--){var v=d[y];if(v.namespace===u.namespaceURI){v.prefix&&(m=v.prefix+":"+h);break}}}if(a&&!Y.QName_exact.test(m))throw new x('The element name "'+m+'" is not a valid XML QName',he.InvalidStateError);e.push("<",m);for(var w=d.slice(),D=0;D<p;D++){var A=f.item(D);A.prefix=="xmlns"?w.push({prefix:A.localName,namespace:A.value}):A.nodeName=="xmlns"&&w.push({prefix:"",namespace:A.value})}for(var D=0;D<p;D++){var A=f.item(D);if(xs(A,l,w)){var $=A.prefix||"",R=A.namespaceURI;hn(e,$?"xmlns:"+$:"xmlns",R,a),w.push({prefix:$,namespace:R})}var V=i?i(A):A;V&&(typeof V=="string"?e.push(V):hn(e,V.name,V.value,a))}if(h===m&&xs(u,l,w)){var me=u.prefix||"",R=u.namespaceURI;hn(e,me?"xmlns:"+me:"xmlns",R,a),w.push({prefix:me,namespace:R})}var M=!u.firstChild;if(M&&(l||u.namespaceURI===$e.HTML)&&(M=ed(h)),M)return e.push("/>"),null;if(e.push(">"),l&&Qc(h)){for(var H=u.firstChild;H;)H.data?e.push(H.data):Li(H,e,w.slice(),n),H=H.nextSibling;return e.push("</",m,">"),null}return{ns:w,tag:m};case Pt:case ot:if(a&&u.nodeType===Pt&&u.documentElement==null)throw new x("The Document has no documentElement",he.InvalidStateError);return{ns:d};case Ft:return hn(e,u.name,u.value,a),null;case kr:if(a&&Y.InvalidChar.test(u.data))throw new x("The Text node data contains characters outside the XML Char production",he.InvalidStateError);return e.push(u.data.replace(/[<&>]/g,Is)),null;case As:if(a&&u.data.indexOf("]]>")!==-1)throw new x('The CDATASection data contains "]]>"',he.InvalidStateError);return s?e.push(Y.CDATA_START,u.data.replace(/]]>/g,"]]]]><![CDATA[>"),Y.CDATA_END):e.push(Y.CDATA_START,u.data,Y.CDATA_END),null;case Ii:if(a){if(Y.InvalidChar.test(u.data))throw new x("The comment node data contains characters outside the XML Char production",he.InvalidStateError);if(u.data.indexOf("--")!==-1||u.data[u.data.length-1]==="-")throw new x('The comment node data contains "--" or ends with "-"',he.InvalidStateError)}return e.push(Y.COMMENT_START,u.data,Y.COMMENT_END),null;case Ts:var te=u.publicId,U=u.systemId;if(a){if(!Y.Name_exact.test(u.name))throw new x('The doctype name "'+u.name+'" is not a valid XML Name',he.InvalidStateError);if(te&&!Y.PubidLiteral_match.test(te))throw new x("DocumentType publicId is not a valid PubidLiteral",he.InvalidStateError);if(U&&U!=="."&&!Y.SystemLiteral_match.test(U))throw new x("DocumentType systemId is not a valid SystemLiteral",he.InvalidStateError);if(u.internalSubset&&u.internalSubset.indexOf("]>")!==-1)throw new x('DocumentType internalSubset contains "]>"',he.InvalidStateError)}return e.push(Y.DOCTYPE_DECL_START," ",u.name),te?(e.push(" ",Y.PUBLIC," ",te),U&&U!=="."&&e.push(" ",U)):U&&U!=="."&&e.push(" ",Y.SYSTEM," ",U),u.internalSubset&&e.push(" [",u.internalSubset,"]"),e.push(">"),null;case Si:if(a){if(!Y.NCName_exact.test(u.target)||u.target.toLowerCase()==="xml")throw new x('The processing instruction target "'+u.target+'" is not a valid XML NCName or is reserved',he.InvalidStateError);if(Y.InvalidChar.test(u.data))throw new x("The ProcessingInstruction data contains characters outside the XML Char production",he.InvalidStateError);if(u.data.indexOf("?>")!==-1)throw new x('The ProcessingInstruction data contains "?>"',he.InvalidStateError)}return e.push("<?",u.target," ",u.data,"?>"),null;case Ds:if(a&&!Y.Name_exact.test(u.nodeName))throw new x('The entity reference name "'+u.nodeName+'" is not a valid XML Name',he.InvalidStateError);return e.push("&",u.nodeName,";"),null;default:return e.push("??",u.nodeName),null}},exit:function(u,c){c&&c.tag&&e.push("</",c.tag,">")}})}function gd(r,e,t){var n;return de(e,null,{enter:function(i,a){var s=i.cloneNode(!1);s.ownerDocument=r,s.parentNode=null,a===null?n=s:a.appendChild(s);var o=i.nodeType===Ft||t;return o?s:null}}),n}function $s(r,e,t){var n;return de(e,null,{enter:function(i,a){var s=new i.constructor(ge);for(var o in i)if($t(i,o)){var l=i[o];typeof l!="object"&&l!=s[o]&&(s[o]=l)}i.childNodes&&(s.childNodes=new ne),s.ownerDocument=r;var u=t;switch(s.nodeType){case Ae:var c=i.attributes,d=s.attributes=new Ut,f=c.length;d._ownerElement=s;for(var p=0;p<f;p++)s.setAttributeNode($s(r,c.item(p),!0));break;case Ft:u=!0}return a!==null?a.appendChild(s):n=s,u?s:null}}),n}function Fs(r,e,t){r[e]=t}function Ci(r){for(var e=[],t=r.firstChild;t;)t.nodeType===Ae&&e.push(t),t=t.nextSibling;return e}try{Object.defineProperty&&(Object.defineProperty(Le.prototype,"length",{get:function(){return bn(this),this.$$length}}),Object.defineProperty(L.prototype,"textContent",{get:function(){if(this.nodeType===Ae||this.nodeType===ot){var r=[];return de(this,null,{enter:function(e){if(e.nodeType===Ae||e.nodeType===ot)return!0;if(e.nodeType===Si||e.nodeType===Ii)return null;r.push(e.nodeValue)}}),r.join("")}return this.nodeValue},set:function(r){switch(this.nodeType){case Ae:case ot:for(;this.firstChild;)this.removeChild(this.firstChild);(r||String(r))&&this.appendChild(this.ownerDocument.createTextNode(r));break;default:this.data=r,this.value=r,this.nodeValue=r}}}),Object.defineProperty(ut.prototype,"data",{get:function(){return this._data!=null?this._data:""},set:function(r){this._data=r,this.length=typeof r=="string"?r.length:0}}),Object.defineProperty(ut.prototype,"nodeValue",{get:function(){return this.data},set:function(r){this.data=r},enumerable:!0,configurable:!0}),Object.defineProperty(We.prototype,"children",{get:function(){return new Le(this,Ci)}}),Object.defineProperty(He.prototype,"children",{get:function(){return new Le(this,Ci)}}),Object.defineProperty(jt.prototype,"children",{get:function(){return new Le(this,Ci)}}),Fs=function(r,e,t){r["$$"+e]=t})}catch{}Z._updateLiveList=bn;Z.Attr=yt;Z.CDATASection=wn;Z.CharacterData=ut;Z.Comment=_n;Z.Document=He;Z.DocumentFragment=jt;Z.DocumentType=yn;Z.DOMImplementation=Ss;Z.Element=We;Z.Entity=Ri;Z.EntityReference=vn;Z.LiveNodeList=Le;Z.NamedNodeMap=Ut;Z.Node=L;Z.NodeList=ne;Z.Notation=Mi;Z.Text=Ar;Z.ProcessingInstruction=xn;Z.walkDOM=de;Z.XMLSerializer=Ls});var qs=Ke(Dr=>{"use strict";var Us=wt().freeze;Dr.XML_ENTITIES=Us({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'});Dr.HTML_ENTITIES=Us({Aacute:"\xC1",aacute:"\xE1",Abreve:"\u0102",abreve:"\u0103",ac:"\u223E",acd:"\u223F",acE:"\u223E\u0333",Acirc:"\xC2",acirc:"\xE2",acute:"\xB4",Acy:"\u0410",acy:"\u0430",AElig:"\xC6",aelig:"\xE6",af:"\u2061",Afr:"\u{1D504}",afr:"\u{1D51E}",Agrave:"\xC0",agrave:"\xE0",alefsym:"\u2135",aleph:"\u2135",Alpha:"\u0391",alpha:"\u03B1",Amacr:"\u0100",amacr:"\u0101",amalg:"\u2A3F",AMP:"&",amp:"&",And:"\u2A53",and:"\u2227",andand:"\u2A55",andd:"\u2A5C",andslope:"\u2A58",andv:"\u2A5A",ang:"\u2220",ange:"\u29A4",angle:"\u2220",angmsd:"\u2221",angmsdaa:"\u29A8",angmsdab:"\u29A9",angmsdac:"\u29AA",angmsdad:"\u29AB",angmsdae:"\u29AC",angmsdaf:"\u29AD",angmsdag:"\u29AE",angmsdah:"\u29AF",angrt:"\u221F",angrtvb:"\u22BE",angrtvbd:"\u299D",angsph:"\u2222",angst:"\xC5",angzarr:"\u237C",Aogon:"\u0104",aogon:"\u0105",Aopf:"\u{1D538}",aopf:"\u{1D552}",ap:"\u2248",apacir:"\u2A6F",apE:"\u2A70",ape:"\u224A",apid:"\u224B",apos:"'",ApplyFunction:"\u2061",approx:"\u2248",approxeq:"\u224A",Aring:"\xC5",aring:"\xE5",Ascr:"\u{1D49C}",ascr:"\u{1D4B6}",Assign:"\u2254",ast:"*",asymp:"\u2248",asympeq:"\u224D",Atilde:"\xC3",atilde:"\xE3",Auml:"\xC4",auml:"\xE4",awconint:"\u2233",awint:"\u2A11",backcong:"\u224C",backepsilon:"\u03F6",backprime:"\u2035",backsim:"\u223D",backsimeq:"\u22CD",Backslash:"\u2216",Barv:"\u2AE7",barvee:"\u22BD",Barwed:"\u2306",barwed:"\u2305",barwedge:"\u2305",bbrk:"\u23B5",bbrktbrk:"\u23B6",bcong:"\u224C",Bcy:"\u0411",bcy:"\u0431",bdquo:"\u201E",becaus:"\u2235",Because:"\u2235",because:"\u2235",bemptyv:"\u29B0",bepsi:"\u03F6",bernou:"\u212C",Bernoullis:"\u212C",Beta:"\u0392",beta:"\u03B2",beth:"\u2136",between:"\u226C",Bfr:"\u{1D505}",bfr:"\u{1D51F}",bigcap:"\u22C2",bigcirc:"\u25EF",bigcup:"\u22C3",bigodot:"\u2A00",bigoplus:"\u2A01",bigotimes:"\u2A02",bigsqcup:"\u2A06",bigstar:"\u2605",bigtriangledown:"\u25BD",bigtriangleup:"\u25B3",biguplus:"\u2A04",bigvee:"\u22C1",bigwedge:"\u22C0",bkarow:"\u290D",blacklozenge:"\u29EB",blacksquare:"\u25AA",blacktriangle:"\u25B4",blacktriangledown:"\u25BE",blacktriangleleft:"\u25C2",blacktriangleright:"\u25B8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20E5",bnequiv:"\u2261\u20E5",bNot:"\u2AED",bnot:"\u2310",Bopf:"\u{1D539}",bopf:"\u{1D553}",bot:"\u22A5",bottom:"\u22A5",bowtie:"\u22C8",boxbox:"\u29C9",boxDL:"\u2557",boxDl:"\u2556",boxdL:"\u2555",boxdl:"\u2510",boxDR:"\u2554",boxDr:"\u2553",boxdR:"\u2552",boxdr:"\u250C",boxH:"\u2550",boxh:"\u2500",boxHD:"\u2566",boxHd:"\u2564",boxhD:"\u2565",boxhd:"\u252C",boxHU:"\u2569",boxHu:"\u2567",boxhU:"\u2568",boxhu:"\u2534",boxminus:"\u229F",boxplus:"\u229E",boxtimes:"\u22A0",boxUL:"\u255D",boxUl:"\u255C",boxuL:"\u255B",boxul:"\u2518",boxUR:"\u255A",boxUr:"\u2559",boxuR:"\u2558",boxur:"\u2514",boxV:"\u2551",boxv:"\u2502",boxVH:"\u256C",boxVh:"\u256B",boxvH:"\u256A",boxvh:"\u253C",boxVL:"\u2563",boxVl:"\u2562",boxvL:"\u2561",boxvl:"\u2524",boxVR:"\u2560",boxVr:"\u255F",boxvR:"\u255E",boxvr:"\u251C",bprime:"\u2035",Breve:"\u02D8",breve:"\u02D8",brvbar:"\xA6",Bscr:"\u212C",bscr:"\u{1D4B7}",bsemi:"\u204F",bsim:"\u223D",bsime:"\u22CD",bsol:"\\",bsolb:"\u29C5",bsolhsub:"\u27C8",bull:"\u2022",bullet:"\u2022",bump:"\u224E",bumpE:"\u2AAE",bumpe:"\u224F",Bumpeq:"\u224E",bumpeq:"\u224F",Cacute:"\u0106",cacute:"\u0107",Cap:"\u22D2",cap:"\u2229",capand:"\u2A44",capbrcup:"\u2A49",capcap:"\u2A4B",capcup:"\u2A47",capdot:"\u2A40",CapitalDifferentialD:"\u2145",caps:"\u2229\uFE00",caret:"\u2041",caron:"\u02C7",Cayleys:"\u212D",ccaps:"\u2A4D",Ccaron:"\u010C",ccaron:"\u010D",Ccedil:"\xC7",ccedil:"\xE7",Ccirc:"\u0108",ccirc:"\u0109",Cconint:"\u2230",ccups:"\u2A4C",ccupssm:"\u2A50",Cdot:"\u010A",cdot:"\u010B",cedil:"\xB8",Cedilla:"\xB8",cemptyv:"\u29B2",cent:"\xA2",CenterDot:"\xB7",centerdot:"\xB7",Cfr:"\u212D",cfr:"\u{1D520}",CHcy:"\u0427",chcy:"\u0447",check:"\u2713",checkmark:"\u2713",Chi:"\u03A7",chi:"\u03C7",cir:"\u25CB",circ:"\u02C6",circeq:"\u2257",circlearrowleft:"\u21BA",circlearrowright:"\u21BB",circledast:"\u229B",circledcirc:"\u229A",circleddash:"\u229D",CircleDot:"\u2299",circledR:"\xAE",circledS:"\u24C8",CircleMinus:"\u2296",CirclePlus:"\u2295",CircleTimes:"\u2297",cirE:"\u29C3",cire:"\u2257",cirfnint:"\u2A10",cirmid:"\u2AEF",cirscir:"\u29C2",ClockwiseContourIntegral:"\u2232",CloseCurlyDoubleQuote:"\u201D",CloseCurlyQuote:"\u2019",clubs:"\u2663",clubsuit:"\u2663",Colon:"\u2237",colon:":",Colone:"\u2A74",colone:"\u2254",coloneq:"\u2254",comma:",",commat:"@",comp:"\u2201",compfn:"\u2218",complement:"\u2201",complexes:"\u2102",cong:"\u2245",congdot:"\u2A6D",Congruent:"\u2261",Conint:"\u222F",conint:"\u222E",ContourIntegral:"\u222E",Copf:"\u2102",copf:"\u{1D554}",coprod:"\u2210",Coproduct:"\u2210",COPY:"\xA9",copy:"\xA9",copysr:"\u2117",CounterClockwiseContourIntegral:"\u2233",crarr:"\u21B5",Cross:"\u2A2F",cross:"\u2717",Cscr:"\u{1D49E}",cscr:"\u{1D4B8}",csub:"\u2ACF",csube:"\u2AD1",csup:"\u2AD0",csupe:"\u2AD2",ctdot:"\u22EF",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22DE",cuesc:"\u22DF",cularr:"\u21B6",cularrp:"\u293D",Cup:"\u22D3",cup:"\u222A",cupbrcap:"\u2A48",CupCap:"\u224D",cupcap:"\u2A46",cupcup:"\u2A4A",cupdot:"\u228D",cupor:"\u2A45",cups:"\u222A\uFE00",curarr:"\u21B7",curarrm:"\u293C",curlyeqprec:"\u22DE",curlyeqsucc:"\u22DF",curlyvee:"\u22CE",curlywedge:"\u22CF",curren:"\xA4",curvearrowleft:"\u21B6",curvearrowright:"\u21B7",cuvee:"\u22CE",cuwed:"\u22CF",cwconint:"\u2232",cwint:"\u2231",cylcty:"\u232D",Dagger:"\u2021",dagger:"\u2020",daleth:"\u2138",Darr:"\u21A1",dArr:"\u21D3",darr:"\u2193",dash:"\u2010",Dashv:"\u2AE4",dashv:"\u22A3",dbkarow:"\u290F",dblac:"\u02DD",Dcaron:"\u010E",dcaron:"\u010F",Dcy:"\u0414",dcy:"\u0434",DD:"\u2145",dd:"\u2146",ddagger:"\u2021",ddarr:"\u21CA",DDotrahd:"\u2911",ddotseq:"\u2A77",deg:"\xB0",Del:"\u2207",Delta:"\u0394",delta:"\u03B4",demptyv:"\u29B1",dfisht:"\u297F",Dfr:"\u{1D507}",dfr:"\u{1D521}",dHar:"\u2965",dharl:"\u21C3",dharr:"\u21C2",DiacriticalAcute:"\xB4",DiacriticalDot:"\u02D9",DiacriticalDoubleAcute:"\u02DD",DiacriticalGrave:"`",DiacriticalTilde:"\u02DC",diam:"\u22C4",Diamond:"\u22C4",diamond:"\u22C4",diamondsuit:"\u2666",diams:"\u2666",die:"\xA8",DifferentialD:"\u2146",digamma:"\u03DD",disin:"\u22F2",div:"\xF7",divide:"\xF7",divideontimes:"\u22C7",divonx:"\u22C7",DJcy:"\u0402",djcy:"\u0452",dlcorn:"\u231E",dlcrop:"\u230D",dollar:"$",Dopf:"\u{1D53B}",dopf:"\u{1D555}",Dot:"\xA8",dot:"\u02D9",DotDot:"\u20DC",doteq:"\u2250",doteqdot:"\u2251",DotEqual:"\u2250",dotminus:"\u2238",dotplus:"\u2214",dotsquare:"\u22A1",doublebarwedge:"\u2306",DoubleContourIntegral:"\u222F",DoubleDot:"\xA8",DoubleDownArrow:"\u21D3",DoubleLeftArrow:"\u21D0",DoubleLeftRightArrow:"\u21D4",DoubleLeftTee:"\u2AE4",DoubleLongLeftArrow:"\u27F8",DoubleLongLeftRightArrow:"\u27FA",DoubleLongRightArrow:"\u27F9",DoubleRightArrow:"\u21D2",DoubleRightTee:"\u22A8",DoubleUpArrow:"\u21D1",DoubleUpDownArrow:"\u21D5",DoubleVerticalBar:"\u2225",DownArrow:"\u2193",Downarrow:"\u21D3",downarrow:"\u2193",DownArrowBar:"\u2913",DownArrowUpArrow:"\u21F5",DownBreve:"\u0311",downdownarrows:"\u21CA",downharpoonleft:"\u21C3",downharpoonright:"\u21C2",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295E",DownLeftVector:"\u21BD",DownLeftVectorBar:"\u2956",DownRightTeeVector:"\u295F",DownRightVector:"\u21C1",DownRightVectorBar:"\u2957",DownTee:"\u22A4",DownTeeArrow:"\u21A7",drbkarow:"\u2910",drcorn:"\u231F",drcrop:"\u230C",Dscr:"\u{1D49F}",dscr:"\u{1D4B9}",DScy:"\u0405",dscy:"\u0455",dsol:"\u29F6",Dstrok:"\u0110",dstrok:"\u0111",dtdot:"\u22F1",dtri:"\u25BF",dtrif:"\u25BE",duarr:"\u21F5",duhar:"\u296F",dwangle:"\u29A6",DZcy:"\u040F",dzcy:"\u045F",dzigrarr:"\u27FF",Eacute:"\xC9",eacute:"\xE9",easter:"\u2A6E",Ecaron:"\u011A",ecaron:"\u011B",ecir:"\u2256",Ecirc:"\xCA",ecirc:"\xEA",ecolon:"\u2255",Ecy:"\u042D",ecy:"\u044D",eDDot:"\u2A77",Edot:"\u0116",eDot:"\u2251",edot:"\u0117",ee:"\u2147",efDot:"\u2252",Efr:"\u{1D508}",efr:"\u{1D522}",eg:"\u2A9A",Egrave:"\xC8",egrave:"\xE8",egs:"\u2A96",egsdot:"\u2A98",el:"\u2A99",Element:"\u2208",elinters:"\u23E7",ell:"\u2113",els:"\u2A95",elsdot:"\u2A97",Emacr:"\u0112",emacr:"\u0113",empty:"\u2205",emptyset:"\u2205",EmptySmallSquare:"\u25FB",emptyv:"\u2205",EmptyVerySmallSquare:"\u25AB",emsp:"\u2003",emsp13:"\u2004",emsp14:"\u2005",ENG:"\u014A",eng:"\u014B",ensp:"\u2002",Eogon:"\u0118",eogon:"\u0119",Eopf:"\u{1D53C}",eopf:"\u{1D556}",epar:"\u22D5",eparsl:"\u29E3",eplus:"\u2A71",epsi:"\u03B5",Epsilon:"\u0395",epsilon:"\u03B5",epsiv:"\u03F5",eqcirc:"\u2256",eqcolon:"\u2255",eqsim:"\u2242",eqslantgtr:"\u2A96",eqslantless:"\u2A95",Equal:"\u2A75",equals:"=",EqualTilde:"\u2242",equest:"\u225F",Equilibrium:"\u21CC",equiv:"\u2261",equivDD:"\u2A78",eqvparsl:"\u29E5",erarr:"\u2971",erDot:"\u2253",Escr:"\u2130",escr:"\u212F",esdot:"\u2250",Esim:"\u2A73",esim:"\u2242",Eta:"\u0397",eta:"\u03B7",ETH:"\xD0",eth:"\xF0",Euml:"\xCB",euml:"\xEB",euro:"\u20AC",excl:"!",exist:"\u2203",Exists:"\u2203",expectation:"\u2130",ExponentialE:"\u2147",exponentiale:"\u2147",fallingdotseq:"\u2252",Fcy:"\u0424",fcy:"\u0444",female:"\u2640",ffilig:"\uFB03",fflig:"\uFB00",ffllig:"\uFB04",Ffr:"\u{1D509}",ffr:"\u{1D523}",filig:"\uFB01",FilledSmallSquare:"\u25FC",FilledVerySmallSquare:"\u25AA",fjlig:"fj",flat:"\u266D",fllig:"\uFB02",fltns:"\u25B1",fnof:"\u0192",Fopf:"\u{1D53D}",fopf:"\u{1D557}",ForAll:"\u2200",forall:"\u2200",fork:"\u22D4",forkv:"\u2AD9",Fouriertrf:"\u2131",fpartint:"\u2A0D",frac12:"\xBD",frac13:"\u2153",frac14:"\xBC",frac15:"\u2155",frac16:"\u2159",frac18:"\u215B",frac23:"\u2154",frac25:"\u2156",frac34:"\xBE",frac35:"\u2157",frac38:"\u215C",frac45:"\u2158",frac56:"\u215A",frac58:"\u215D",frac78:"\u215E",frasl:"\u2044",frown:"\u2322",Fscr:"\u2131",fscr:"\u{1D4BB}",gacute:"\u01F5",Gamma:"\u0393",gamma:"\u03B3",Gammad:"\u03DC",gammad:"\u03DD",gap:"\u2A86",Gbreve:"\u011E",gbreve:"\u011F",Gcedil:"\u0122",Gcirc:"\u011C",gcirc:"\u011D",Gcy:"\u0413",gcy:"\u0433",Gdot:"\u0120",gdot:"\u0121",gE:"\u2267",ge:"\u2265",gEl:"\u2A8C",gel:"\u22DB",geq:"\u2265",geqq:"\u2267",geqslant:"\u2A7E",ges:"\u2A7E",gescc:"\u2AA9",gesdot:"\u2A80",gesdoto:"\u2A82",gesdotol:"\u2A84",gesl:"\u22DB\uFE00",gesles:"\u2A94",Gfr:"\u{1D50A}",gfr:"\u{1D524}",Gg:"\u22D9",gg:"\u226B",ggg:"\u22D9",gimel:"\u2137",GJcy:"\u0403",gjcy:"\u0453",gl:"\u2277",gla:"\u2AA5",glE:"\u2A92",glj:"\u2AA4",gnap:"\u2A8A",gnapprox:"\u2A8A",gnE:"\u2269",gne:"\u2A88",gneq:"\u2A88",gneqq:"\u2269",gnsim:"\u22E7",Gopf:"\u{1D53E}",gopf:"\u{1D558}",grave:"`",GreaterEqual:"\u2265",GreaterEqualLess:"\u22DB",GreaterFullEqual:"\u2267",GreaterGreater:"\u2AA2",GreaterLess:"\u2277",GreaterSlantEqual:"\u2A7E",GreaterTilde:"\u2273",Gscr:"\u{1D4A2}",gscr:"\u210A",gsim:"\u2273",gsime:"\u2A8E",gsiml:"\u2A90",Gt:"\u226B",GT:">",gt:">",gtcc:"\u2AA7",gtcir:"\u2A7A",gtdot:"\u22D7",gtlPar:"\u2995",gtquest:"\u2A7C",gtrapprox:"\u2A86",gtrarr:"\u2978",gtrdot:"\u22D7",gtreqless:"\u22DB",gtreqqless:"\u2A8C",gtrless:"\u2277",gtrsim:"\u2273",gvertneqq:"\u2269\uFE00",gvnE:"\u2269\uFE00",Hacek:"\u02C7",hairsp:"\u200A",half:"\xBD",hamilt:"\u210B",HARDcy:"\u042A",hardcy:"\u044A",hArr:"\u21D4",harr:"\u2194",harrcir:"\u2948",harrw:"\u21AD",Hat:"^",hbar:"\u210F",Hcirc:"\u0124",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",hercon:"\u22B9",Hfr:"\u210C",hfr:"\u{1D525}",HilbertSpace:"\u210B",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21FF",homtht:"\u223B",hookleftarrow:"\u21A9",hookrightarrow:"\u21AA",Hopf:"\u210D",hopf:"\u{1D559}",horbar:"\u2015",HorizontalLine:"\u2500",Hscr:"\u210B",hscr:"\u{1D4BD}",hslash:"\u210F",Hstrok:"\u0126",hstrok:"\u0127",HumpDownHump:"\u224E",HumpEqual:"\u224F",hybull:"\u2043",hyphen:"\u2010",Iacute:"\xCD",iacute:"\xED",ic:"\u2063",Icirc:"\xCE",icirc:"\xEE",Icy:"\u0418",icy:"\u0438",Idot:"\u0130",IEcy:"\u0415",iecy:"\u0435",iexcl:"\xA1",iff:"\u21D4",Ifr:"\u2111",ifr:"\u{1D526}",Igrave:"\xCC",igrave:"\xEC",ii:"\u2148",iiiint:"\u2A0C",iiint:"\u222D",iinfin:"\u29DC",iiota:"\u2129",IJlig:"\u0132",ijlig:"\u0133",Im:"\u2111",Imacr:"\u012A",imacr:"\u012B",image:"\u2111",ImaginaryI:"\u2148",imagline:"\u2110",imagpart:"\u2111",imath:"\u0131",imof:"\u22B7",imped:"\u01B5",Implies:"\u21D2",in:"\u2208",incare:"\u2105",infin:"\u221E",infintie:"\u29DD",inodot:"\u0131",Int:"\u222C",int:"\u222B",intcal:"\u22BA",integers:"\u2124",Integral:"\u222B",intercal:"\u22BA",Intersection:"\u22C2",intlarhk:"\u2A17",intprod:"\u2A3C",InvisibleComma:"\u2063",InvisibleTimes:"\u2062",IOcy:"\u0401",iocy:"\u0451",Iogon:"\u012E",iogon:"\u012F",Iopf:"\u{1D540}",iopf:"\u{1D55A}",Iota:"\u0399",iota:"\u03B9",iprod:"\u2A3C",iquest:"\xBF",Iscr:"\u2110",iscr:"\u{1D4BE}",isin:"\u2208",isindot:"\u22F5",isinE:"\u22F9",isins:"\u22F4",isinsv:"\u22F3",isinv:"\u2208",it:"\u2062",Itilde:"\u0128",itilde:"\u0129",Iukcy:"\u0406",iukcy:"\u0456",Iuml:"\xCF",iuml:"\xEF",Jcirc:"\u0134",jcirc:"\u0135",Jcy:"\u0419",jcy:"\u0439",Jfr:"\u{1D50D}",jfr:"\u{1D527}",jmath:"\u0237",Jopf:"\u{1D541}",jopf:"\u{1D55B}",Jscr:"\u{1D4A5}",jscr:"\u{1D4BF}",Jsercy:"\u0408",jsercy:"\u0458",Jukcy:"\u0404",jukcy:"\u0454",Kappa:"\u039A",kappa:"\u03BA",kappav:"\u03F0",Kcedil:"\u0136",kcedil:"\u0137",Kcy:"\u041A",kcy:"\u043A",Kfr:"\u{1D50E}",kfr:"\u{1D528}",kgreen:"\u0138",KHcy:"\u0425",khcy:"\u0445",KJcy:"\u040C",kjcy:"\u045C",Kopf:"\u{1D542}",kopf:"\u{1D55C}",Kscr:"\u{1D4A6}",kscr:"\u{1D4C0}",lAarr:"\u21DA",Lacute:"\u0139",lacute:"\u013A",laemptyv:"\u29B4",lagran:"\u2112",Lambda:"\u039B",lambda:"\u03BB",Lang:"\u27EA",lang:"\u27E8",langd:"\u2991",langle:"\u27E8",lap:"\u2A85",Laplacetrf:"\u2112",laquo:"\xAB",Larr:"\u219E",lArr:"\u21D0",larr:"\u2190",larrb:"\u21E4",larrbfs:"\u291F",larrfs:"\u291D",larrhk:"\u21A9",larrlp:"\u21AB",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21A2",lat:"\u2AAB",lAtail:"\u291B",latail:"\u2919",late:"\u2AAD",lates:"\u2AAD\uFE00",lBarr:"\u290E",lbarr:"\u290C",lbbrk:"\u2772",lbrace:"{",lbrack:"[",lbrke:"\u298B",lbrksld:"\u298F",lbrkslu:"\u298D",Lcaron:"\u013D",lcaron:"\u013E",Lcedil:"\u013B",lcedil:"\u013C",lceil:"\u2308",lcub:"{",Lcy:"\u041B",lcy:"\u043B",ldca:"\u2936",ldquo:"\u201C",ldquor:"\u201E",ldrdhar:"\u2967",ldrushar:"\u294B",ldsh:"\u21B2",lE:"\u2266",le:"\u2264",LeftAngleBracket:"\u27E8",LeftArrow:"\u2190",Leftarrow:"\u21D0",leftarrow:"\u2190",LeftArrowBar:"\u21E4",LeftArrowRightArrow:"\u21C6",leftarrowtail:"\u21A2",LeftCeiling:"\u2308",LeftDoubleBracket:"\u27E6",LeftDownTeeVector:"\u2961",LeftDownVector:"\u21C3",LeftDownVectorBar:"\u2959",LeftFloor:"\u230A",leftharpoondown:"\u21BD",leftharpoonup:"\u21BC",leftleftarrows:"\u21C7",LeftRightArrow:"\u2194",Leftrightarrow:"\u21D4",leftrightarrow:"\u2194",leftrightarrows:"\u21C6",leftrightharpoons:"\u21CB",leftrightsquigarrow:"\u21AD",LeftRightVector:"\u294E",LeftTee:"\u22A3",LeftTeeArrow:"\u21A4",LeftTeeVector:"\u295A",leftthreetimes:"\u22CB",LeftTriangle:"\u22B2",LeftTriangleBar:"\u29CF",LeftTriangleEqual:"\u22B4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVector:"\u21BF",LeftUpVectorBar:"\u2958",LeftVector:"\u21BC",LeftVectorBar:"\u2952",lEg:"\u2A8B",leg:"\u22DA",leq:"\u2264",leqq:"\u2266",leqslant:"\u2A7D",les:"\u2A7D",lescc:"\u2AA8",lesdot:"\u2A7F",lesdoto:"\u2A81",lesdotor:"\u2A83",lesg:"\u22DA\uFE00",lesges:"\u2A93",lessapprox:"\u2A85",lessdot:"\u22D6",lesseqgtr:"\u22DA",lesseqqgtr:"\u2A8B",LessEqualGreater:"\u22DA",LessFullEqual:"\u2266",LessGreater:"\u2276",lessgtr:"\u2276",LessLess:"\u2AA1",lesssim:"\u2272",LessSlantEqual:"\u2A7D",LessTilde:"\u2272",lfisht:"\u297C",lfloor:"\u230A",Lfr:"\u{1D50F}",lfr:"\u{1D529}",lg:"\u2276",lgE:"\u2A91",lHar:"\u2962",lhard:"\u21BD",lharu:"\u21BC",lharul:"\u296A",lhblk:"\u2584",LJcy:"\u0409",ljcy:"\u0459",Ll:"\u22D8",ll:"\u226A",llarr:"\u21C7",llcorner:"\u231E",Lleftarrow:"\u21DA",llhard:"\u296B",lltri:"\u25FA",Lmidot:"\u013F",lmidot:"\u0140",lmoust:"\u23B0",lmoustache:"\u23B0",lnap:"\u2A89",lnapprox:"\u2A89",lnE:"\u2268",lne:"\u2A87",lneq:"\u2A87",lneqq:"\u2268",lnsim:"\u22E6",loang:"\u27EC",loarr:"\u21FD",lobrk:"\u27E6",LongLeftArrow:"\u27F5",Longleftarrow:"\u27F8",longleftarrow:"\u27F5",LongLeftRightArrow:"\u27F7",Longleftrightarrow:"\u27FA",longleftrightarrow:"\u27F7",longmapsto:"\u27FC",LongRightArrow:"\u27F6",Longrightarrow:"\u27F9",longrightarrow:"\u27F6",looparrowleft:"\u21AB",looparrowright:"\u21AC",lopar:"\u2985",Lopf:"\u{1D543}",lopf:"\u{1D55D}",loplus:"\u2A2D",lotimes:"\u2A34",lowast:"\u2217",lowbar:"_",LowerLeftArrow:"\u2199",LowerRightArrow:"\u2198",loz:"\u25CA",lozenge:"\u25CA",lozf:"\u29EB",lpar:"(",lparlt:"\u2993",lrarr:"\u21C6",lrcorner:"\u231F",lrhar:"\u21CB",lrhard:"\u296D",lrm:"\u200E",lrtri:"\u22BF",lsaquo:"\u2039",Lscr:"\u2112",lscr:"\u{1D4C1}",Lsh:"\u21B0",lsh:"\u21B0",lsim:"\u2272",lsime:"\u2A8D",lsimg:"\u2A8F",lsqb:"[",lsquo:"\u2018",lsquor:"\u201A",Lstrok:"\u0141",lstrok:"\u0142",Lt:"\u226A",LT:"<",lt:"<",ltcc:"\u2AA6",ltcir:"\u2A79",ltdot:"\u22D6",lthree:"\u22CB",ltimes:"\u22C9",ltlarr:"\u2976",ltquest:"\u2A7B",ltri:"\u25C3",ltrie:"\u22B4",ltrif:"\u25C2",ltrPar:"\u2996",lurdshar:"\u294A",luruhar:"\u2966",lvertneqq:"\u2268\uFE00",lvnE:"\u2268\uFE00",macr:"\xAF",male:"\u2642",malt:"\u2720",maltese:"\u2720",Map:"\u2905",map:"\u21A6",mapsto:"\u21A6",mapstodown:"\u21A7",mapstoleft:"\u21A4",mapstoup:"\u21A5",marker:"\u25AE",mcomma:"\u2A29",Mcy:"\u041C",mcy:"\u043C",mdash:"\u2014",mDDot:"\u223A",measuredangle:"\u2221",MediumSpace:"\u205F",Mellintrf:"\u2133",Mfr:"\u{1D510}",mfr:"\u{1D52A}",mho:"\u2127",micro:"\xB5",mid:"\u2223",midast:"*",midcir:"\u2AF0",middot:"\xB7",minus:"\u2212",minusb:"\u229F",minusd:"\u2238",minusdu:"\u2A2A",MinusPlus:"\u2213",mlcp:"\u2ADB",mldr:"\u2026",mnplus:"\u2213",models:"\u22A7",Mopf:"\u{1D544}",mopf:"\u{1D55E}",mp:"\u2213",Mscr:"\u2133",mscr:"\u{1D4C2}",mstpos:"\u223E",Mu:"\u039C",mu:"\u03BC",multimap:"\u22B8",mumap:"\u22B8",nabla:"\u2207",Nacute:"\u0143",nacute:"\u0144",nang:"\u2220\u20D2",nap:"\u2249",napE:"\u2A70\u0338",napid:"\u224B\u0338",napos:"\u0149",napprox:"\u2249",natur:"\u266E",natural:"\u266E",naturals:"\u2115",nbsp:"\xA0",nbump:"\u224E\u0338",nbumpe:"\u224F\u0338",ncap:"\u2A43",Ncaron:"\u0147",ncaron:"\u0148",Ncedil:"\u0145",ncedil:"\u0146",ncong:"\u2247",ncongdot:"\u2A6D\u0338",ncup:"\u2A42",Ncy:"\u041D",ncy:"\u043D",ndash:"\u2013",ne:"\u2260",nearhk:"\u2924",neArr:"\u21D7",nearr:"\u2197",nearrow:"\u2197",nedot:"\u2250\u0338",NegativeMediumSpace:"\u200B",NegativeThickSpace:"\u200B",NegativeThinSpace:"\u200B",NegativeVeryThinSpace:"\u200B",nequiv:"\u2262",nesear:"\u2928",nesim:"\u2242\u0338",NestedGreaterGreater:"\u226B",NestedLessLess:"\u226A",NewLine:`
|
|
2
|
+
`,nexist:"\u2204",nexists:"\u2204",Nfr:"\u{1D511}",nfr:"\u{1D52B}",ngE:"\u2267\u0338",nge:"\u2271",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",nGg:"\u22D9\u0338",ngsim:"\u2275",nGt:"\u226B\u20D2",ngt:"\u226F",ngtr:"\u226F",nGtv:"\u226B\u0338",nhArr:"\u21CE",nharr:"\u21AE",nhpar:"\u2AF2",ni:"\u220B",nis:"\u22FC",nisd:"\u22FA",niv:"\u220B",NJcy:"\u040A",njcy:"\u045A",nlArr:"\u21CD",nlarr:"\u219A",nldr:"\u2025",nlE:"\u2266\u0338",nle:"\u2270",nLeftarrow:"\u21CD",nleftarrow:"\u219A",nLeftrightarrow:"\u21CE",nleftrightarrow:"\u21AE",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",nless:"\u226E",nLl:"\u22D8\u0338",nlsim:"\u2274",nLt:"\u226A\u20D2",nlt:"\u226E",nltri:"\u22EA",nltrie:"\u22EC",nLtv:"\u226A\u0338",nmid:"\u2224",NoBreak:"\u2060",NonBreakingSpace:"\xA0",Nopf:"\u2115",nopf:"\u{1D55F}",Not:"\u2AEC",not:"\xAC",NotCongruent:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",notin:"\u2209",notindot:"\u22F5\u0338",notinE:"\u22F9\u0338",notinva:"\u2209",notinvb:"\u22F7",notinvc:"\u22F6",NotLeftTriangle:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",notni:"\u220C",notniva:"\u220C",notnivb:"\u22FE",notnivc:"\u22FD",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",NotReverseElement:"\u220C",NotRightTriangle:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",NotSubset:"\u2282\u20D2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",npar:"\u2226",nparallel:"\u2226",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",npr:"\u2280",nprcue:"\u22E0",npre:"\u2AAF\u0338",nprec:"\u2280",npreceq:"\u2AAF\u0338",nrArr:"\u21CF",nrarr:"\u219B",nrarrc:"\u2933\u0338",nrarrw:"\u219D\u0338",nRightarrow:"\u21CF",nrightarrow:"\u219B",nrtri:"\u22EB",nrtrie:"\u22ED",nsc:"\u2281",nsccue:"\u22E1",nsce:"\u2AB0\u0338",Nscr:"\u{1D4A9}",nscr:"\u{1D4C3}",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22E2",nsqsupe:"\u22E3",nsub:"\u2284",nsubE:"\u2AC5\u0338",nsube:"\u2288",nsubset:"\u2282\u20D2",nsubseteq:"\u2288",nsubseteqq:"\u2AC5\u0338",nsucc:"\u2281",nsucceq:"\u2AB0\u0338",nsup:"\u2285",nsupE:"\u2AC6\u0338",nsupe:"\u2289",nsupset:"\u2283\u20D2",nsupseteq:"\u2289",nsupseteqq:"\u2AC6\u0338",ntgl:"\u2279",Ntilde:"\xD1",ntilde:"\xF1",ntlg:"\u2278",ntriangleleft:"\u22EA",ntrianglelefteq:"\u22EC",ntriangleright:"\u22EB",ntrianglerighteq:"\u22ED",Nu:"\u039D",nu:"\u03BD",num:"#",numero:"\u2116",numsp:"\u2007",nvap:"\u224D\u20D2",nVDash:"\u22AF",nVdash:"\u22AE",nvDash:"\u22AD",nvdash:"\u22AC",nvge:"\u2265\u20D2",nvgt:">\u20D2",nvHarr:"\u2904",nvinfin:"\u29DE",nvlArr:"\u2902",nvle:"\u2264\u20D2",nvlt:"<\u20D2",nvltrie:"\u22B4\u20D2",nvrArr:"\u2903",nvrtrie:"\u22B5\u20D2",nvsim:"\u223C\u20D2",nwarhk:"\u2923",nwArr:"\u21D6",nwarr:"\u2196",nwarrow:"\u2196",nwnear:"\u2927",Oacute:"\xD3",oacute:"\xF3",oast:"\u229B",ocir:"\u229A",Ocirc:"\xD4",ocirc:"\xF4",Ocy:"\u041E",ocy:"\u043E",odash:"\u229D",Odblac:"\u0150",odblac:"\u0151",odiv:"\u2A38",odot:"\u2299",odsold:"\u29BC",OElig:"\u0152",oelig:"\u0153",ofcir:"\u29BF",Ofr:"\u{1D512}",ofr:"\u{1D52C}",ogon:"\u02DB",Ograve:"\xD2",ograve:"\xF2",ogt:"\u29C1",ohbar:"\u29B5",ohm:"\u03A9",oint:"\u222E",olarr:"\u21BA",olcir:"\u29BE",olcross:"\u29BB",oline:"\u203E",olt:"\u29C0",Omacr:"\u014C",omacr:"\u014D",Omega:"\u03A9",omega:"\u03C9",Omicron:"\u039F",omicron:"\u03BF",omid:"\u29B6",ominus:"\u2296",Oopf:"\u{1D546}",oopf:"\u{1D560}",opar:"\u29B7",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",operp:"\u29B9",oplus:"\u2295",Or:"\u2A54",or:"\u2228",orarr:"\u21BB",ord:"\u2A5D",order:"\u2134",orderof:"\u2134",ordf:"\xAA",ordm:"\xBA",origof:"\u22B6",oror:"\u2A56",orslope:"\u2A57",orv:"\u2A5B",oS:"\u24C8",Oscr:"\u{1D4AA}",oscr:"\u2134",Oslash:"\xD8",oslash:"\xF8",osol:"\u2298",Otilde:"\xD5",otilde:"\xF5",Otimes:"\u2A37",otimes:"\u2297",otimesas:"\u2A36",Ouml:"\xD6",ouml:"\xF6",ovbar:"\u233D",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",OverParenthesis:"\u23DC",par:"\u2225",para:"\xB6",parallel:"\u2225",parsim:"\u2AF3",parsl:"\u2AFD",part:"\u2202",PartialD:"\u2202",Pcy:"\u041F",pcy:"\u043F",percnt:"%",period:".",permil:"\u2030",perp:"\u22A5",pertenk:"\u2031",Pfr:"\u{1D513}",pfr:"\u{1D52D}",Phi:"\u03A6",phi:"\u03C6",phiv:"\u03D5",phmmat:"\u2133",phone:"\u260E",Pi:"\u03A0",pi:"\u03C0",pitchfork:"\u22D4",piv:"\u03D6",planck:"\u210F",planckh:"\u210E",plankv:"\u210F",plus:"+",plusacir:"\u2A23",plusb:"\u229E",pluscir:"\u2A22",plusdo:"\u2214",plusdu:"\u2A25",pluse:"\u2A72",PlusMinus:"\xB1",plusmn:"\xB1",plussim:"\u2A26",plustwo:"\u2A27",pm:"\xB1",Poincareplane:"\u210C",pointint:"\u2A15",Popf:"\u2119",popf:"\u{1D561}",pound:"\xA3",Pr:"\u2ABB",pr:"\u227A",prap:"\u2AB7",prcue:"\u227C",prE:"\u2AB3",pre:"\u2AAF",prec:"\u227A",precapprox:"\u2AB7",preccurlyeq:"\u227C",Precedes:"\u227A",PrecedesEqual:"\u2AAF",PrecedesSlantEqual:"\u227C",PrecedesTilde:"\u227E",preceq:"\u2AAF",precnapprox:"\u2AB9",precneqq:"\u2AB5",precnsim:"\u22E8",precsim:"\u227E",Prime:"\u2033",prime:"\u2032",primes:"\u2119",prnap:"\u2AB9",prnE:"\u2AB5",prnsim:"\u22E8",prod:"\u220F",Product:"\u220F",profalar:"\u232E",profline:"\u2312",profsurf:"\u2313",prop:"\u221D",Proportion:"\u2237",Proportional:"\u221D",propto:"\u221D",prsim:"\u227E",prurel:"\u22B0",Pscr:"\u{1D4AB}",pscr:"\u{1D4C5}",Psi:"\u03A8",psi:"\u03C8",puncsp:"\u2008",Qfr:"\u{1D514}",qfr:"\u{1D52E}",qint:"\u2A0C",Qopf:"\u211A",qopf:"\u{1D562}",qprime:"\u2057",Qscr:"\u{1D4AC}",qscr:"\u{1D4C6}",quaternions:"\u210D",quatint:"\u2A16",quest:"?",questeq:"\u225F",QUOT:'"',quot:'"',rAarr:"\u21DB",race:"\u223D\u0331",Racute:"\u0154",racute:"\u0155",radic:"\u221A",raemptyv:"\u29B3",Rang:"\u27EB",rang:"\u27E9",rangd:"\u2992",range:"\u29A5",rangle:"\u27E9",raquo:"\xBB",Rarr:"\u21A0",rArr:"\u21D2",rarr:"\u2192",rarrap:"\u2975",rarrb:"\u21E5",rarrbfs:"\u2920",rarrc:"\u2933",rarrfs:"\u291E",rarrhk:"\u21AA",rarrlp:"\u21AC",rarrpl:"\u2945",rarrsim:"\u2974",Rarrtl:"\u2916",rarrtl:"\u21A3",rarrw:"\u219D",rAtail:"\u291C",ratail:"\u291A",ratio:"\u2236",rationals:"\u211A",RBarr:"\u2910",rBarr:"\u290F",rbarr:"\u290D",rbbrk:"\u2773",rbrace:"}",rbrack:"]",rbrke:"\u298C",rbrksld:"\u298E",rbrkslu:"\u2990",Rcaron:"\u0158",rcaron:"\u0159",Rcedil:"\u0156",rcedil:"\u0157",rceil:"\u2309",rcub:"}",Rcy:"\u0420",rcy:"\u0440",rdca:"\u2937",rdldhar:"\u2969",rdquo:"\u201D",rdquor:"\u201D",rdsh:"\u21B3",Re:"\u211C",real:"\u211C",realine:"\u211B",realpart:"\u211C",reals:"\u211D",rect:"\u25AD",REG:"\xAE",reg:"\xAE",ReverseElement:"\u220B",ReverseEquilibrium:"\u21CB",ReverseUpEquilibrium:"\u296F",rfisht:"\u297D",rfloor:"\u230B",Rfr:"\u211C",rfr:"\u{1D52F}",rHar:"\u2964",rhard:"\u21C1",rharu:"\u21C0",rharul:"\u296C",Rho:"\u03A1",rho:"\u03C1",rhov:"\u03F1",RightAngleBracket:"\u27E9",RightArrow:"\u2192",Rightarrow:"\u21D2",rightarrow:"\u2192",RightArrowBar:"\u21E5",RightArrowLeftArrow:"\u21C4",rightarrowtail:"\u21A3",RightCeiling:"\u2309",RightDoubleBracket:"\u27E7",RightDownTeeVector:"\u295D",RightDownVector:"\u21C2",RightDownVectorBar:"\u2955",RightFloor:"\u230B",rightharpoondown:"\u21C1",rightharpoonup:"\u21C0",rightleftarrows:"\u21C4",rightleftharpoons:"\u21CC",rightrightarrows:"\u21C9",rightsquigarrow:"\u219D",RightTee:"\u22A2",RightTeeArrow:"\u21A6",RightTeeVector:"\u295B",rightthreetimes:"\u22CC",RightTriangle:"\u22B3",RightTriangleBar:"\u29D0",RightTriangleEqual:"\u22B5",RightUpDownVector:"\u294F",RightUpTeeVector:"\u295C",RightUpVector:"\u21BE",RightUpVectorBar:"\u2954",RightVector:"\u21C0",RightVectorBar:"\u2953",ring:"\u02DA",risingdotseq:"\u2253",rlarr:"\u21C4",rlhar:"\u21CC",rlm:"\u200F",rmoust:"\u23B1",rmoustache:"\u23B1",rnmid:"\u2AEE",roang:"\u27ED",roarr:"\u21FE",robrk:"\u27E7",ropar:"\u2986",Ropf:"\u211D",ropf:"\u{1D563}",roplus:"\u2A2E",rotimes:"\u2A35",RoundImplies:"\u2970",rpar:")",rpargt:"\u2994",rppolint:"\u2A12",rrarr:"\u21C9",Rrightarrow:"\u21DB",rsaquo:"\u203A",Rscr:"\u211B",rscr:"\u{1D4C7}",Rsh:"\u21B1",rsh:"\u21B1",rsqb:"]",rsquo:"\u2019",rsquor:"\u2019",rthree:"\u22CC",rtimes:"\u22CA",rtri:"\u25B9",rtrie:"\u22B5",rtrif:"\u25B8",rtriltri:"\u29CE",RuleDelayed:"\u29F4",ruluhar:"\u2968",rx:"\u211E",Sacute:"\u015A",sacute:"\u015B",sbquo:"\u201A",Sc:"\u2ABC",sc:"\u227B",scap:"\u2AB8",Scaron:"\u0160",scaron:"\u0161",sccue:"\u227D",scE:"\u2AB4",sce:"\u2AB0",Scedil:"\u015E",scedil:"\u015F",Scirc:"\u015C",scirc:"\u015D",scnap:"\u2ABA",scnE:"\u2AB6",scnsim:"\u22E9",scpolint:"\u2A13",scsim:"\u227F",Scy:"\u0421",scy:"\u0441",sdot:"\u22C5",sdotb:"\u22A1",sdote:"\u2A66",searhk:"\u2925",seArr:"\u21D8",searr:"\u2198",searrow:"\u2198",sect:"\xA7",semi:";",seswar:"\u2929",setminus:"\u2216",setmn:"\u2216",sext:"\u2736",Sfr:"\u{1D516}",sfr:"\u{1D530}",sfrown:"\u2322",sharp:"\u266F",SHCHcy:"\u0429",shchcy:"\u0449",SHcy:"\u0428",shcy:"\u0448",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",shortmid:"\u2223",shortparallel:"\u2225",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",shy:"\xAD",Sigma:"\u03A3",sigma:"\u03C3",sigmaf:"\u03C2",sigmav:"\u03C2",sim:"\u223C",simdot:"\u2A6A",sime:"\u2243",simeq:"\u2243",simg:"\u2A9E",simgE:"\u2AA0",siml:"\u2A9D",simlE:"\u2A9F",simne:"\u2246",simplus:"\u2A24",simrarr:"\u2972",slarr:"\u2190",SmallCircle:"\u2218",smallsetminus:"\u2216",smashp:"\u2A33",smeparsl:"\u29E4",smid:"\u2223",smile:"\u2323",smt:"\u2AAA",smte:"\u2AAC",smtes:"\u2AAC\uFE00",SOFTcy:"\u042C",softcy:"\u044C",sol:"/",solb:"\u29C4",solbar:"\u233F",Sopf:"\u{1D54A}",sopf:"\u{1D564}",spades:"\u2660",spadesuit:"\u2660",spar:"\u2225",sqcap:"\u2293",sqcaps:"\u2293\uFE00",sqcup:"\u2294",sqcups:"\u2294\uFE00",Sqrt:"\u221A",sqsub:"\u228F",sqsube:"\u2291",sqsubset:"\u228F",sqsubseteq:"\u2291",sqsup:"\u2290",sqsupe:"\u2292",sqsupset:"\u2290",sqsupseteq:"\u2292",squ:"\u25A1",Square:"\u25A1",square:"\u25A1",SquareIntersection:"\u2293",SquareSubset:"\u228F",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",squarf:"\u25AA",squf:"\u25AA",srarr:"\u2192",Sscr:"\u{1D4AE}",sscr:"\u{1D4C8}",ssetmn:"\u2216",ssmile:"\u2323",sstarf:"\u22C6",Star:"\u22C6",star:"\u2606",starf:"\u2605",straightepsilon:"\u03F5",straightphi:"\u03D5",strns:"\xAF",Sub:"\u22D0",sub:"\u2282",subdot:"\u2ABD",subE:"\u2AC5",sube:"\u2286",subedot:"\u2AC3",submult:"\u2AC1",subnE:"\u2ACB",subne:"\u228A",subplus:"\u2ABF",subrarr:"\u2979",Subset:"\u22D0",subset:"\u2282",subseteq:"\u2286",subseteqq:"\u2AC5",SubsetEqual:"\u2286",subsetneq:"\u228A",subsetneqq:"\u2ACB",subsim:"\u2AC7",subsub:"\u2AD5",subsup:"\u2AD3",succ:"\u227B",succapprox:"\u2AB8",succcurlyeq:"\u227D",Succeeds:"\u227B",SucceedsEqual:"\u2AB0",SucceedsSlantEqual:"\u227D",SucceedsTilde:"\u227F",succeq:"\u2AB0",succnapprox:"\u2ABA",succneqq:"\u2AB6",succnsim:"\u22E9",succsim:"\u227F",SuchThat:"\u220B",Sum:"\u2211",sum:"\u2211",sung:"\u266A",Sup:"\u22D1",sup:"\u2283",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",supdot:"\u2ABE",supdsub:"\u2AD8",supE:"\u2AC6",supe:"\u2287",supedot:"\u2AC4",Superset:"\u2283",SupersetEqual:"\u2287",suphsol:"\u27C9",suphsub:"\u2AD7",suplarr:"\u297B",supmult:"\u2AC2",supnE:"\u2ACC",supne:"\u228B",supplus:"\u2AC0",Supset:"\u22D1",supset:"\u2283",supseteq:"\u2287",supseteqq:"\u2AC6",supsetneq:"\u228B",supsetneqq:"\u2ACC",supsim:"\u2AC8",supsub:"\u2AD4",supsup:"\u2AD6",swarhk:"\u2926",swArr:"\u21D9",swarr:"\u2199",swarrow:"\u2199",swnwar:"\u292A",szlig:"\xDF",Tab:" ",target:"\u2316",Tau:"\u03A4",tau:"\u03C4",tbrk:"\u23B4",Tcaron:"\u0164",tcaron:"\u0165",Tcedil:"\u0162",tcedil:"\u0163",Tcy:"\u0422",tcy:"\u0442",tdot:"\u20DB",telrec:"\u2315",Tfr:"\u{1D517}",tfr:"\u{1D531}",there4:"\u2234",Therefore:"\u2234",therefore:"\u2234",Theta:"\u0398",theta:"\u03B8",thetasym:"\u03D1",thetav:"\u03D1",thickapprox:"\u2248",thicksim:"\u223C",ThickSpace:"\u205F\u200A",thinsp:"\u2009",ThinSpace:"\u2009",thkap:"\u2248",thksim:"\u223C",THORN:"\xDE",thorn:"\xFE",Tilde:"\u223C",tilde:"\u02DC",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",times:"\xD7",timesb:"\u22A0",timesbar:"\u2A31",timesd:"\u2A30",tint:"\u222D",toea:"\u2928",top:"\u22A4",topbot:"\u2336",topcir:"\u2AF1",Topf:"\u{1D54B}",topf:"\u{1D565}",topfork:"\u2ADA",tosa:"\u2929",tprime:"\u2034",TRADE:"\u2122",trade:"\u2122",triangle:"\u25B5",triangledown:"\u25BF",triangleleft:"\u25C3",trianglelefteq:"\u22B4",triangleq:"\u225C",triangleright:"\u25B9",trianglerighteq:"\u22B5",tridot:"\u25EC",trie:"\u225C",triminus:"\u2A3A",TripleDot:"\u20DB",triplus:"\u2A39",trisb:"\u29CD",tritime:"\u2A3B",trpezium:"\u23E2",Tscr:"\u{1D4AF}",tscr:"\u{1D4C9}",TScy:"\u0426",tscy:"\u0446",TSHcy:"\u040B",tshcy:"\u045B",Tstrok:"\u0166",tstrok:"\u0167",twixt:"\u226C",twoheadleftarrow:"\u219E",twoheadrightarrow:"\u21A0",Uacute:"\xDA",uacute:"\xFA",Uarr:"\u219F",uArr:"\u21D1",uarr:"\u2191",Uarrocir:"\u2949",Ubrcy:"\u040E",ubrcy:"\u045E",Ubreve:"\u016C",ubreve:"\u016D",Ucirc:"\xDB",ucirc:"\xFB",Ucy:"\u0423",ucy:"\u0443",udarr:"\u21C5",Udblac:"\u0170",udblac:"\u0171",udhar:"\u296E",ufisht:"\u297E",Ufr:"\u{1D518}",ufr:"\u{1D532}",Ugrave:"\xD9",ugrave:"\xF9",uHar:"\u2963",uharl:"\u21BF",uharr:"\u21BE",uhblk:"\u2580",ulcorn:"\u231C",ulcorner:"\u231C",ulcrop:"\u230F",ultri:"\u25F8",Umacr:"\u016A",umacr:"\u016B",uml:"\xA8",UnderBar:"_",UnderBrace:"\u23DF",UnderBracket:"\u23B5",UnderParenthesis:"\u23DD",Union:"\u22C3",UnionPlus:"\u228E",Uogon:"\u0172",uogon:"\u0173",Uopf:"\u{1D54C}",uopf:"\u{1D566}",UpArrow:"\u2191",Uparrow:"\u21D1",uparrow:"\u2191",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21C5",UpDownArrow:"\u2195",Updownarrow:"\u21D5",updownarrow:"\u2195",UpEquilibrium:"\u296E",upharpoonleft:"\u21BF",upharpoonright:"\u21BE",uplus:"\u228E",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",Upsi:"\u03D2",upsi:"\u03C5",upsih:"\u03D2",Upsilon:"\u03A5",upsilon:"\u03C5",UpTee:"\u22A5",UpTeeArrow:"\u21A5",upuparrows:"\u21C8",urcorn:"\u231D",urcorner:"\u231D",urcrop:"\u230E",Uring:"\u016E",uring:"\u016F",urtri:"\u25F9",Uscr:"\u{1D4B0}",uscr:"\u{1D4CA}",utdot:"\u22F0",Utilde:"\u0168",utilde:"\u0169",utri:"\u25B5",utrif:"\u25B4",uuarr:"\u21C8",Uuml:"\xDC",uuml:"\xFC",uwangle:"\u29A7",vangrt:"\u299C",varepsilon:"\u03F5",varkappa:"\u03F0",varnothing:"\u2205",varphi:"\u03D5",varpi:"\u03D6",varpropto:"\u221D",vArr:"\u21D5",varr:"\u2195",varrho:"\u03F1",varsigma:"\u03C2",varsubsetneq:"\u228A\uFE00",varsubsetneqq:"\u2ACB\uFE00",varsupsetneq:"\u228B\uFE00",varsupsetneqq:"\u2ACC\uFE00",vartheta:"\u03D1",vartriangleleft:"\u22B2",vartriangleright:"\u22B3",Vbar:"\u2AEB",vBar:"\u2AE8",vBarv:"\u2AE9",Vcy:"\u0412",vcy:"\u0432",VDash:"\u22AB",Vdash:"\u22A9",vDash:"\u22A8",vdash:"\u22A2",Vdashl:"\u2AE6",Vee:"\u22C1",vee:"\u2228",veebar:"\u22BB",veeeq:"\u225A",vellip:"\u22EE",Verbar:"\u2016",verbar:"|",Vert:"\u2016",vert:"|",VerticalBar:"\u2223",VerticalLine:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",VeryThinSpace:"\u200A",Vfr:"\u{1D519}",vfr:"\u{1D533}",vltri:"\u22B2",vnsub:"\u2282\u20D2",vnsup:"\u2283\u20D2",Vopf:"\u{1D54D}",vopf:"\u{1D567}",vprop:"\u221D",vrtri:"\u22B3",Vscr:"\u{1D4B1}",vscr:"\u{1D4CB}",vsubnE:"\u2ACB\uFE00",vsubne:"\u228A\uFE00",vsupnE:"\u2ACC\uFE00",vsupne:"\u228B\uFE00",Vvdash:"\u22AA",vzigzag:"\u299A",Wcirc:"\u0174",wcirc:"\u0175",wedbar:"\u2A5F",Wedge:"\u22C0",wedge:"\u2227",wedgeq:"\u2259",weierp:"\u2118",Wfr:"\u{1D51A}",wfr:"\u{1D534}",Wopf:"\u{1D54E}",wopf:"\u{1D568}",wp:"\u2118",wr:"\u2240",wreath:"\u2240",Wscr:"\u{1D4B2}",wscr:"\u{1D4CC}",xcap:"\u22C2",xcirc:"\u25EF",xcup:"\u22C3",xdtri:"\u25BD",Xfr:"\u{1D51B}",xfr:"\u{1D535}",xhArr:"\u27FA",xharr:"\u27F7",Xi:"\u039E",xi:"\u03BE",xlArr:"\u27F8",xlarr:"\u27F5",xmap:"\u27FC",xnis:"\u22FB",xodot:"\u2A00",Xopf:"\u{1D54F}",xopf:"\u{1D569}",xoplus:"\u2A01",xotime:"\u2A02",xrArr:"\u27F9",xrarr:"\u27F6",Xscr:"\u{1D4B3}",xscr:"\u{1D4CD}",xsqcup:"\u2A06",xuplus:"\u2A04",xutri:"\u25B3",xvee:"\u22C1",xwedge:"\u22C0",Yacute:"\xDD",yacute:"\xFD",YAcy:"\u042F",yacy:"\u044F",Ycirc:"\u0176",ycirc:"\u0177",Ycy:"\u042B",ycy:"\u044B",yen:"\xA5",Yfr:"\u{1D51C}",yfr:"\u{1D536}",YIcy:"\u0407",yicy:"\u0457",Yopf:"\u{1D550}",yopf:"\u{1D56A}",Yscr:"\u{1D4B4}",yscr:"\u{1D4CE}",YUcy:"\u042E",yucy:"\u044E",Yuml:"\u0178",yuml:"\xFF",Zacute:"\u0179",zacute:"\u017A",Zcaron:"\u017D",zcaron:"\u017E",Zcy:"\u0417",zcy:"\u0437",Zdot:"\u017B",zdot:"\u017C",zeetrf:"\u2128",ZeroWidthSpace:"\u200B",Zeta:"\u0396",zeta:"\u03B6",Zfr:"\u2128",zfr:"\u{1D537}",ZHcy:"\u0416",zhcy:"\u0436",zigrarr:"\u21DD",Zopf:"\u2124",zopf:"\u{1D56B}",Zscr:"\u{1D4B5}",zscr:"\u{1D4CF}",zwj:"\u200D",zwnj:"\u200C"});Dr.entityMap=Dr.HTML_ENTITIES});var Zs=Ke(kn=>{"use strict";var Gt=wt(),I=Ti(),Hs=br(),bd=Gt.isHTMLEscapableRawTextElement,_d=Gt.isHTMLMimeType,wd=Gt.isHTMLRawTextElement,Nr=Gt.hasOwn,js=Gt.NAMESPACE,yd=Hs.ParseError,vd=Hs.DOMException,zt=0,ct=1,Vt=2,Tr=3,Ht=4,Wt=5,Cr=6,En=7;function Ws(){}Ws.prototype={parse:function(r,e,t){var n=this.domBuilder;n.startDocument(),Ad(e,e=Object.create(null)),xd(r,e,t,n,this.errorHandler),n.endDocument()}};var $i=/&#?\w+;?/g;function xd(r,e,t,n,i){var a=_d(n.mimeType);r.indexOf(I.UNICODE_REPLACEMENT_CHARACTER)>=0&&i.warning("Unicode replacement character detected, source encoding issues?");function s(F){if(F>65535){F-=65536;var ke=55296+(F>>10),Vr=56320+(F&1023);return String.fromCharCode(ke,Vr)}else return String.fromCharCode(F)}function o(F){var ke=F[F.length-1]===";"?F:F+";";if(!a&&ke!==F)return i.error("EntityRef: expecting ;"),F;var Vr=I.Reference.exec(ke);if(!Vr||Vr[0].length!==ke.length)return i.error("entity not matching Reference production: "+F),F;var Hr=ke.slice(1,-1);return Nr(t,Hr)?t[Hr]:Hr.charAt(0)==="#"?s(parseInt(Hr.substring(1).replace("x","0x"))):(i.error("entity not found:"+F),F)}function l(F){if(F>g){var ke=r.substring(g,F).replace($i,o);f&&p(g),n.characters(ke,0,F-g),g=F}}var u=0,c=0,d=/\r\n?|\n|$/g,f=n.locator;function p(F,ke){for(;F>=c&&(ke=d.exec(r));)u=c,c=ke.index+ke[0].length,f.lineNumber++;f.columnNumber=F-u+1}for(var h=[{currentNSMap:e}],m=[],g=0;;){try{var b=r.indexOf("<",g);if(b<0){if(!a&&m.length>0)return i.fatalError("unclosed xml tag(s): "+m.join(", "));if(!r.substring(g).match(/^\s*$/)){var y=n.doc,v=y.createTextNode(r.substring(g));if(y.documentElement)return i.error("Extra content at the end of the document");y.appendChild(v),n.currentElement=v}return}if(b>g){var w=r.substring(g,b);!a&&m.length===0&&(w=w.replace(new RegExp(I.S_OPT.source,"g"),""),w&&i.error("Unexpected content outside root element: '"+w+"'")),l(b)}switch(r.charAt(b+1)){case"/":var B=r.indexOf(">",b+2),D=r.substring(b+2,B>0?B:void 0);if(!D)return i.fatalError("end tag name missing");var A=I.reg("^",I.QName_group,I.S_OPT,"$"),$=B>0&&A.exec(D);if(!$){var R=B>0&&I.reg("^",I.QName_group).exec(D);if(a&&R)i.warning('end tag name contains invalid trailing characters: "'+D+'"'),$=R;else if(R&&new RegExp(A.source,A.flags+"m").test(D))i.error('end tag name is followed by a line break and trailing content: "'+D+'"'),$=R;else return i.fatalError('end tag name contains invalid characters: "'+D+'"')}if(!n.currentElement&&!n.doc.documentElement)return;var V=m[m.length-1]||n.currentElement.tagName||n.doc.documentElement.tagName||"";if(V!==$[1]){var me=$[1].toLowerCase();if(!a||V.toLowerCase()!==me)return i.fatalError('Opening and ending tag mismatch: "'+V+'" != "'+D+'"')}var M=h.pop();m.pop();var H=M.localNSMap;if(n.endElement(M.uri,M.localName,V),H)for(var te in H)Nr(H,te)&&n.endPrefixMapping(te);B++;break;case"?":f&&p(b),B=Td(r,b,n,i);break;case"!":f&&p(b),B=Xs(r,b,n,i,a);break;default:f&&p(b);var U=new Ys,Q=h[h.length-1].currentNSMap,B=Ed(r,b,U,Q,o,i,a),ha=U.length;if(U.closed||(a&&Gt.isHTMLVoidElement(U.tagName)?U.closed=!0:m.push(U.tagName)),f&&ha){for(var dl=zs(f,{}),Xn=0;Xn<ha;Xn++){var ma=U[Xn];p(ma.offset),ma.locator=zs(f,{})}n.locator=dl,Vs(U,n,Q)&&h.push(U),n.locator=f}else Vs(U,n,Q)&&h.push(U);a&&!U.closed?B=kd(r,B,U.tagName,o,n):B++}}catch(F){if(F instanceof yd)throw F;if(F instanceof vd)return i.fatalError("Error constructing the DOM: "+F.name+": "+F.message,F);i.error("element parse error: "+F),B=-1}B>g?g=B:l(Math.max(b,g)+1)}}function zs(r,e){return e.lineNumber=r.lineNumber,e.columnNumber=r.columnNumber,e}function Ed(r,e,t,n,i,a,s){function o(p,h,m){if(Nr(t.attributeNames,p))return a.fatalError("Attribute "+p+" redefined");if(!s&&h.indexOf("<")>=0)return a.fatalError("Unescaped '<' not allowed in attributes values");t.addValue(p,h.replace(/[\t\n\r]/g," ").replace($i,i),m)}for(var l,u,c=++e,d=zt;;){var f=r.charAt(c);if(d===zt&&f==="<")throw new Error("unexpected < in tag name: "+r.slice(e,c));switch(f){case"=":if(d===ct)l=r.slice(e,c),d=Tr;else if(d===Vt)d=Tr;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(d===Tr||d===ct)if(d===ct&&(a.warning('attribute value must after "="'),l=r.slice(e,c)),e=c+1,c=r.indexOf(f,e),c>0)u=r.slice(e,c),o(l,u,e-1),d=Wt;else throw new Error("attribute value no end '"+f+"' match");else if(d==Ht)u=r.slice(e,c),o(l,u,e),a.warning('attribute "'+l+'" missed start quot('+f+")!!"),e=c+1,d=Wt;else throw new Error('attribute value must after "="');break;case"/":switch(d){case zt:t.setTagName(r.slice(e,c));case Wt:case Cr:case En:d=En,t.closed=!0;case Ht:case ct:break;case Vt:t.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return a.error("unexpected end of input"),d==zt&&t.setTagName(r.slice(e,c)),c;case">":switch(d){case zt:t.setTagName(r.slice(e,c));case Wt:case Cr:case En:break;case Ht:case ct:u=r.slice(e,c),u.slice(-1)==="/"&&(t.closed=!0,u=u.slice(0,-1));case Vt:d===Vt&&(u=l),d==Ht?(a.warning('attribute "'+u+'" missed quot(")!'),o(l,u,e)):(s||a.warning('attribute "'+u+'" missed value!! "'+u+'" instead!!'),o(u,u,e));break;case Tr:if(!s)return a.fatalError(`AttValue: ' or " expected`)}return c;case"\x80":f=" ";default:if(f<=" ")switch(d){case zt:t.setTagName(r.slice(e,c)),d=Cr;break;case ct:l=r.slice(e,c),d=Vt;break;case Ht:var u=r.slice(e,c);a.warning('attribute "'+u+'" missed quot(")!!'),o(l,u,e);case Wt:d=Cr;break}else switch(d){case Vt:s||a.warning('attribute "'+l+'" missed value!! "'+l+'" instead2!!'),o(l,l,e),e=c,d=ct;break;case Wt:a.warning('attribute space is required"'+l+'"!!');case Cr:d=ct,e=c;break;case Tr:d=Ht,e=c;break;case En:throw new Error("elements closed character '/' and '>' must be connected to")}}c++}}function Vs(r,e,t){for(var n=r.tagName,i=null,d=r.length;d--;){var a=r[d],s=a.qName,o=a.value,f=s.indexOf(":");if(f>0)var l=a.prefix=s.slice(0,f),u=s.slice(f+1),c=l==="xmlns"&&u;else u=s,l=null,c=s==="xmlns"&&"";a.localName=u,c!==!1&&(i==null&&(i=Object.create(null),t=Object.create(t)),t[c]=i[c]=o,a.uri=js.XMLNS,e.startPrefixMapping(c,o))}for(var d=r.length;d--;)a=r[d],a.prefix&&(a.prefix==="xml"&&(a.uri=js.XML),a.prefix!=="xmlns"&&(a.uri=t[a.prefix]));var f=n.indexOf(":");f>0?(l=r.prefix=n.slice(0,f),u=r.localName=n.slice(f+1)):(l=null,u=r.localName=n);var p=r.uri=t[l||""];if(e.startElement(p,u,n,r),r.closed){if(e.endElement(p,u,n),i)for(l in i)Nr(i,l)&&e.endPrefixMapping(l)}else return r.currentNSMap=t,r.localNSMap=i,!0}function kd(r,e,t,n,i){var a=bd(t);if(a||wd(t)){var s=new RegExp("</"+t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")+">","ig");s.lastIndex=e;var o=s.exec(r),l=o?o.index:-1;if(l<0)return e+1;var u=r.substring(e+1,l);return a&&(u=u.replace($i,n)),i.characters(u,0,u.length),l}return e+1}function Ad(r,e){for(var t in r)Nr(r,t)&&(e[t]=r[t])}function Gs(r,e){var t=e;function n(c){return c=c||0,r.charAt(t+c)}function i(c){c=c||1,t+=c}function a(){for(var c=0;t<r.length;){var d=n();if(d!==" "&&d!==`
|
|
3
|
+
`&&d!==" "&&d!=="\r")return c;c++,i()}return-1}function s(){return r.substring(t)}function o(c){return r.substring(t,t+c.length)===c}function l(c){return r.substring(t,t+c.length).toUpperCase()===c.toUpperCase()}function u(c){var d=I.reg("^",c),f=d.exec(s());return f?(i(f[0].length),f[0]):null}return{char:n,getIndex:function(){return t},getMatch:u,getSource:function(){return r},skip:i,skipBlanks:a,substringFromIndex:s,substringStartsWith:o,substringStartsWithCaseInsensitive:l}}function Dd(r,e){function t(o,l){var u=I.PI.exec(o.substringFromIndex());return u?u[1].toLowerCase()==="xml"?l.fatalError("xml declaration is only allowed at the start of the document, but found at position "+o.getIndex()):(o.skip(u[0].length),u[0]):l.fatalError("processing instruction is not well-formed at position "+o.getIndex())}var n=r.getSource();if(r.char()==="["){r.skip(1);for(var i=r.getIndex();r.getIndex()<n.length;){if(r.skipBlanks(),r.char()==="]"){var a=n.substring(i,r.getIndex());return r.skip(1),a}var s=null;if(r.char()==="<"&&r.char(1)==="!")switch(r.char(2)){case"E":r.char(3)==="L"?s=r.getMatch(I.elementdecl):r.char(3)==="N"&&(s=r.getMatch(I.EntityDecl));break;case"A":s=r.getMatch(I.AttlistDecl);break;case"N":s=r.getMatch(I.NotationDecl);break;case"-":s=r.getMatch(I.Comment);break}else if(r.char()==="<"&&r.char(1)==="?")s=t(r,e);else if(r.char()==="%")s=r.getMatch(I.PEReference);else return e.fatalError("Error detected in Markup declaration");if(!s)return e.fatalError("Error in internal subset at position "+r.getIndex())}return e.fatalError("doctype internal subset is not well-formed, missing ]")}}function Xs(r,e,t,n,i){var a=Gs(r,e);switch(i?a.char(2).toUpperCase():a.char(2)){case"-":var s=a.getMatch(I.Comment);return s?(t.comment(s,I.COMMENT_START.length,s.length-I.COMMENT_START.length-I.COMMENT_END.length),a.getIndex()):n.fatalError("comment is not well-formed at position "+a.getIndex());case"[":var o=a.getMatch(I.CDSect);return o?!i&&!t.currentElement?n.fatalError("CDATA outside of element"):(t.startCDATA(),t.characters(o,I.CDATA_START.length,o.length-I.CDATA_START.length-I.CDATA_END.length),t.endCDATA(),a.getIndex()):n.fatalError("Invalid CDATA starting at position "+e);case"D":{if(t.doc&&t.doc.documentElement)return n.fatalError("Doctype not allowed inside or after documentElement at position "+a.getIndex());if(i?!a.substringStartsWithCaseInsensitive(I.DOCTYPE_DECL_START):!a.substringStartsWith(I.DOCTYPE_DECL_START))return n.fatalError("Expected "+I.DOCTYPE_DECL_START+" at position "+a.getIndex());if(a.skip(I.DOCTYPE_DECL_START.length),a.skipBlanks()<1)return n.fatalError("Expected whitespace after "+I.DOCTYPE_DECL_START+" at position "+a.getIndex());var l={name:void 0,publicId:void 0,systemId:void 0,internalSubset:void 0};if(l.name=a.getMatch(I.Name),!l.name)return n.fatalError("doctype name missing or contains unexpected characters at position "+a.getIndex());if(i&&l.name.toLowerCase()!=="html"&&n.warning("Unexpected DOCTYPE in HTML document at position "+a.getIndex()),a.skipBlanks(),a.substringStartsWith(I.PUBLIC)||a.substringStartsWith(I.SYSTEM)){var u=I.ExternalID_match.exec(a.substringFromIndex());if(!u)return n.fatalError("doctype external id is not well-formed at position "+a.getIndex());u.groups.SystemLiteralOnly!==void 0?l.systemId=u.groups.SystemLiteralOnly:(l.systemId=u.groups.SystemLiteral,l.publicId=u.groups.PubidLiteral),a.skip(u[0].length)}else if(i&&a.substringStartsWithCaseInsensitive(I.SYSTEM)){if(a.skip(I.SYSTEM.length),a.skipBlanks()<1)return n.fatalError("Expected whitespace after "+I.SYSTEM+" at position "+a.getIndex());if(l.systemId=a.getMatch(I.ABOUT_LEGACY_COMPAT_SystemLiteral),!l.systemId)return n.fatalError("Expected "+I.ABOUT_LEGACY_COMPAT+" in single or double quotes after "+I.SYSTEM+" at position "+a.getIndex())}return i&&l.systemId&&!I.ABOUT_LEGACY_COMPAT_SystemLiteral.test(l.systemId)&&n.warning("Unexpected doctype.systemId in HTML document at position "+a.getIndex()),i||(a.skipBlanks(),l.internalSubset=Dd(a,n)),a.skipBlanks(),a.char()!==">"?n.fatalError("doctype not terminated with > at position "+a.getIndex()):(a.skip(1),t.startDTD(l.name,l.publicId,l.systemId,l.internalSubset),t.endDTD(),a.getIndex())}default:return n.fatalError('Not well-formed XML starting with "<!" at position '+e)}}function Td(r,e,t,n){var i=r.substring(e).match(I.PI);if(!i)return n.fatalError("Invalid processing instruction starting at position "+e);if(i[1].toLowerCase()==="xml"){if(e>0)return n.fatalError("processing instruction at position "+e+" is an xml declaration which is only at the start of the document");if(!I.XMLDecl.test(r.substring(e)))return n.fatalError("xml declaration is not well-formed")}return t.processingInstruction(i[1],i[2]),e+i[0].length}function Ys(){this.attributeNames=Object.create(null)}Ys.prototype={setTagName:function(r){if(!I.QName_exact.test(r))throw new Error("invalid tagName:"+r);this.tagName=r},addValue:function(r,e,t){if(!I.QName_exact.test(r))throw new Error("invalid attribute:"+r);this.attributeNames[r]=this.length,this[this.length++]={qName:r,value:e,offset:t}},length:0,getLocalName:function(r){return this[r].localName},getLocator:function(r){return this[r].locator},getQName:function(r){return this[r].qName},getURI:function(r){return this[r].uri},getValue:function(r){return this[r].value}};kn.XMLReader=Ws;kn.parseUtils=Gs;kn.parseDoctypeCommentOrCData=Xs});var no=Ke(Yt=>{"use strict";var vt=wt(),Cd=Pi(),Nd=br(),Js=qs(),Sd=Zs(),Id=Cd.DOMImplementation,Bd=vt.hasDefaultHTMLNamespace,Od=vt.isHTMLMimeType,Md=vt.isValidMimeType,eo=vt.MIME_TYPE,Fi=vt.NAMESPACE,Ks=Nd.ParseError,Rd=Sd.XMLReader;function to(r){return r.replace(/\r[\n\u0085]/g,`
|
|
4
4
|
`).replace(/[\r\u0085\u2028\u2029]/g,`
|
|
5
|
-
`)}function
|
|
6
|
-
@#[line:`+r.lineNumber+",col:"+r.columnNumber+"]"}function
|
|
5
|
+
`)}function ro(r){if(r=r||{},r.locator===void 0&&(r.locator=!0),this.assign=r.assign||vt.assign,this.domHandler=r.domHandler||Dn,this.onError=r.onError||r.errorHandler,r.errorHandler&&typeof r.errorHandler!="function")throw new TypeError("errorHandler object is no longer supported, switch to onError!");r.errorHandler&&r.errorHandler("warning","The `errorHandler` option has been deprecated, use `onError` instead!",this),this.normalizeLineEndings=r.normalizeLineEndings||to,this.locator=!!r.locator,this.xmlns=this.assign(Object.create(null),r.xmlns)}ro.prototype.parseFromString=function(r,e){if(!Md(e))throw new TypeError('DOMParser.parseFromString: the provided mimeType "'+e+'" is not valid.');var t=this.assign(Object.create(null),this.xmlns),n=Js.XML_ENTITIES,i=t[""]||null;Bd(e)?(n=Js.HTML_ENTITIES,i=Fi.HTML):e===eo.XML_SVG_IMAGE&&(i=Fi.SVG),t[""]=i,t.xml=t.xml||Fi.XML;var a=new this.domHandler({mimeType:e,defaultNamespace:i,onError:this.onError}),s=this.locator?{}:void 0;this.locator&&a.setDocumentLocator(s);var o=new Rd;o.errorHandler=a,o.domBuilder=a;var l=!vt.isHTMLMimeType(e);return l&&typeof r!="string"&&o.errorHandler.fatalError("source is not a string"),o.parse(this.normalizeLineEndings(String(r)),t,n),a.doc.documentElement||o.errorHandler.fatalError("missing root element"),a.doc};function Dn(r){var e=r||{};this.mimeType=e.mimeType||eo.XML_APPLICATION,this.defaultNamespace=e.defaultNamespace||null,this.cdata=!1,this.currentElement=void 0,this.doc=void 0,this.locator=void 0,this.onError=e.onError}function Xt(r,e){e.lineNumber=r.lineNumber,e.columnNumber=r.columnNumber}Dn.prototype={startDocument:function(){var r=new Id;this.doc=Od(this.mimeType)?r.createHTMLDocument(!1):r.createDocument(this.defaultNamespace,"")},startElement:function(r,e,t,n){var i=this.doc,a=i.createElementNS(r,t||e),s=n.length;An(this,a),this.currentElement=a,this.locator&&Xt(this.locator,a);for(var o=0;o<s;o++){var r=n.getURI(o),l=n.getValue(o),t=n.getQName(o),u=i.createAttributeNS(r,t);this.locator&&Xt(n.getLocator(o),u),u.value=u.nodeValue=l,a.setAttributeNode(u)}},endElement:function(r,e,t){this.currentElement=this.currentElement.parentNode},startPrefixMapping:function(r,e){},endPrefixMapping:function(r){},processingInstruction:function(r,e){var t=this.doc.createProcessingInstruction(r,e);this.locator&&Xt(this.locator,t),An(this,t)},ignorableWhitespace:function(r,e,t){},characters:function(r,e,t){if(r=Qs.apply(this,arguments),r){if(this.cdata)var n=this.doc.createCDATASection(r);else var n=this.doc.createTextNode(r);this.currentElement?this.currentElement.appendChild(n):/^\s*$/.test(r)&&this.doc.appendChild(n),this.locator&&Xt(this.locator,n)}},skippedEntity:function(r){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(r){r&&(r.lineNumber=0),this.locator=r},comment:function(r,e,t){r=Qs.apply(this,arguments);var n=this.doc.createComment(r);this.locator&&Xt(this.locator,n),An(this,n)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(r,e,t,n){var i=this.doc.implementation;if(i&&i.createDocumentType){var a=i.createDocumentType(r,e,t,n);this.locator&&Xt(this.locator,a),An(this,a),this.doc.doctype=a}},reportError:function(r,e){if(typeof this.onError=="function")try{this.onError(r,e,this)}catch(t){throw new Ks("Reporting "+r+' "'+e+'" caused '+t,this.locator)}else console.error("[xmldom "+r+"] "+e,Ld(this.locator))},warning:function(r){this.reportError("warning",r)},error:function(r){this.reportError("error",r)},fatalError:function(r,e){throw this.reportError("fatalError",r),new Ks(r,this.locator,e)}};function Ld(r){if(r)return`
|
|
6
|
+
@#[line:`+r.lineNumber+",col:"+r.columnNumber+"]"}function Qs(r,e,t){return typeof r=="string"?r.substr(e,t):r.length>=e+t||e?new java.lang.String(r,e,t)+"":r}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(r){Dn.prototype[r]=function(){return null}});function An(r,e){r.currentElement?r.currentElement.appendChild(e):r.doc.appendChild(e)}function Pd(r){if(r==="error")throw"onErrorStopParsing"}function $d(){throw"onWarningStopParsing"}Yt.__DOMHandler=Dn;Yt.DOMParser=ro;Yt.normalizeLineEndings=to;Yt.onErrorStopParsing=Pd;Yt.onWarningStopParsing=$d});var Ui=Ke(P=>{"use strict";var Zt=wt();P.assign=Zt.assign;P.hasDefaultHTMLNamespace=Zt.hasDefaultHTMLNamespace;P.isHTMLMimeType=Zt.isHTMLMimeType;P.isValidMimeType=Zt.isValidMimeType;P.MIME_TYPE=Zt.MIME_TYPE;P.NAMESPACE=Zt.NAMESPACE;var Tn=br();P.DOMException=Tn.DOMException;P.DOMExceptionName=Tn.DOMExceptionName;P.ExceptionCode=Tn.ExceptionCode;P.ParseError=Tn.ParseError;var ie=Pi();P.Attr=ie.Attr;P.CDATASection=ie.CDATASection;P.CharacterData=ie.CharacterData;P.Comment=ie.Comment;P.Document=ie.Document;P.DocumentFragment=ie.DocumentFragment;P.DocumentType=ie.DocumentType;P.DOMImplementation=ie.DOMImplementation;P.Element=ie.Element;P.Entity=ie.Entity;P.EntityReference=ie.EntityReference;P.LiveNodeList=ie.LiveNodeList;P.NamedNodeMap=ie.NamedNodeMap;P.Node=ie.Node;P.NodeList=ie.NodeList;P.Notation=ie.Notation;P.ProcessingInstruction=ie.ProcessingInstruction;P.Text=ie.Text;P.XMLSerializer=ie.XMLSerializer;var Cn=no();P.DOMParser=Cn.DOMParser;P.normalizeLineEndings=Cn.normalizeLineEndings;P.onErrorStopParsing=Cn.onErrorStopParsing;P.onWarningStopParsing=Cn.onWarningStopParsing});var q={};ga(q,{defineCollection:()=>Jn});nr(q,dp);import*as dp from"@gramlot/gramlot/components";import{defineCollection as bl}from"@gramlot/gramlot/components";function Jn(r){if(r.name!=="layout")throw new Error("Unexpected bundled collection");let e=[],t={};r.css?.forEach((n,i)=>{n.href=e[i].href});for(let[n,i]of Object.entries(r.assets??{}))i.href=t[n].href;return bl({...r,css:e,assets:t})}function Kn(r,e=","){if(typeof e!="string"||!e)throw new TypeError("separator must be a nonempty string");if(r==="")return[];let t=new Set;return r.split(e).map(n=>{let i=n.indexOf(":"),a=i<0?n:n.slice(0,i),s=i<0?n:n.slice(i+1);if(!a||t.has(a))throw new Error("Invalid or duplicate choice code");return t.add(a),{id:a,caption:s}})}function Qn(r,e,t=""){return r.find(n=>n.id===e)?.caption??t??""}var _a=["TL","TC","TR","L","R","BL","BC","BR"];function wa(r){return r?.labelbox?r.labelbox.controlBox.firstElementChild:r}function Wr(r){return class extends r{setLabelbox(e){let{box:t,labelBox:n,fieldLabel:i}=e;Object.assign(this,{box:t,labelBox:n,fieldLabel:i}),i.addEventListener("click",()=>{this.control.focus(),this.control.localName==="input"&&["checkbox","radio"].includes(this.control.type)&&this.control.click()})}projectAttributes(e,t){let n=super.projectAttributes(e,t),{lbl:i,lbl_value:a,lbl_values:s}=this.parameters,o=s==null?i??"":Qn(Kn(s),a,i);return o?this.control.setAttribute("aria-label",o):this.control.removeAttribute("aria-label"),n}}}Wr.labelbox=!0;Wr.parameters={lbl:{dtype:"T",qualification:"intl_str",nullable:!0,binding:"read"},lbl_value:{dtype:"T",nullable:!0,binding:"twoWay"},lbl_values:{dtype:"T",nullable:!0,binding:"read"},lbl_position:{dtype:"T",default:"TL",binding:"read",enum:_a}};function Gr(r,e){return r.parameters=_l(r.constructor.gramlotComponent,e),Object.fromEntries(Object.entries(e).filter(([t])=>!Object.hasOwn(r.parameters,t)))}function _l(r,e){return Object.fromEntries(Object.entries(r.parameters).map(([t,n])=>[t,Object.hasOwn(e,t)?e[t]:n.default]))}function ve(r){return class extends r{constructor(){super();let e=this.attachShadow({mode:"open"}),t=this.ownerDocument.createElement("style");t.textContent=`:host{box-sizing:border-box;display:block;min-width:0;font:inherit;color:var(--gramlot-ink,CanvasText)}
|
|
7
7
|
*,*::before,*::after{box-sizing:border-box}.control-box{min-width:0}slot{display:contents}
|
|
8
|
-
::slotted(*){min-width:0;max-width:100%}`,this.controlBox=this.ownerDocument.createElement("div"),this.controlBox.className="control-box",this.control=this.controlBox,this.control.id="control",this.control.append(this.ownerDocument.createElement("slot")),e.append(t,this.controlBox)}projectAttributes(e){return Gr(this,e)}}}ve.parameters={};function Xr(){return Array.from(globalThis.crypto.getRandomValues(new Uint8Array(16)),r=>r.toString(16).padStart(2,"0")).join("")}function Qe(r){if(typeof r!="string"||!["^","="].includes(r[0])||r.startsWith("=="))return null;let e=r.indexOf(":");if(e<0)return null;let t=r[e+1]==="=";return{pointer:r.slice(0,e),expression:t,body:r.slice(e+(t?2:1))}}var
|
|
9
|
-
`,
|
|
8
|
+
::slotted(*){min-width:0;max-width:100%}`,this.controlBox=this.ownerDocument.createElement("div"),this.controlBox.className="control-box",this.control=this.controlBox,this.control.id="control",this.control.append(this.ownerDocument.createElement("slot")),e.append(t,this.controlBox)}projectAttributes(e){return Gr(this,e)}}}ve.parameters={};function Xr(){return Array.from(globalThis.crypto.getRandomValues(new Uint8Array(16)),r=>r.toString(16).padStart(2,"0")).join("")}function Qe(r){if(typeof r!="string"||!["^","="].includes(r[0])||r.startsWith("=="))return null;let e=r.indexOf(":");if(e<0)return null;let t=r[e+1]==="=";return{pointer:r.slice(0,e),expression:t,body:r.slice(e+(t?2:1))}}var ya=/^\{(\??[A-Za-z_][A-Za-z0-9_]*|\?)?\}/;function ei(r,e){let t="",n=!1;for(let i=0;i<r.length;){if(r[i]!=="{"&&r[i]!=="}"){t+=r[i++];continue}let a=r.slice(i).match(ya);if(!a)throw new SyntaxError("Invalid pointer template placeholder");let s=a[1]??"",o=s.startsWith("?"),l=e(o?s.slice(1):s);l==null||l===""&&!o?n=!0:t+=String(l),i+=a[0].length}return n?null:t}function ti(r){let e=[],t=new Set,n="",i=!0;for(let a=0;a<r.length;){let s=a,o=r[a];if(o==='"'||o==="'"||o==="`"){for(a++;a<r.length;){if(r[a]==="\\"){a+=2;continue}if(r[a++]===o)break}n+=r.slice(s,a),i=!1;continue}if(r.startsWith("//",a)){a=r.indexOf(`
|
|
9
|
+
`,a),a<0&&(a=r.length),n+=r.slice(s,a);continue}if(r.startsWith("/*",a)){let c=r.indexOf("*/",a+2);a=c<0?r.length:c+2,n+=r.slice(s,a);continue}if(o==="/"&&i){let c=!1;for(a++;a<r.length;){let d=r[a++];if(d==="\\"){a++;continue}if(d==="[")c=!0;else if(d==="]")c=!1;else if(d==="/"&&!c)break}for(;/[a-z]/i.test(r[a]??"")&&a<r.length;)a++;n+=r.slice(s,a),i=!1;continue}let l=o==="{"?r.slice(a).match(ya):null;if(l){let c=l[1]??"";if(c.startsWith("?"))throw new SyntaxError("Optional slots are supported in pointer templates only");n+=`_pointerValues[${e.length}]`,e.push(c),a+=l[0].length,i=!1;continue}let u=r.slice(a).match(/^[A-Za-z_$][\w$]*/);if(u){t.add(u[0]),n+=u[0],a+=u[0].length,i=["return","typeof","void","delete","new","in","instanceof","yield","await"].includes(u[0]);continue}n+=o,a++,/\s/.test(o)||(i=/[([{,:;=!?&|+*%~<>\/-]/.test(o))}return{text:n,slots:e,identifiers:t}}function va(r,e,t=()=>null){let n=new Map,i=[],a=s=>{if(n.has(s))return n.get(s);if(!r.has(s))throw new Error(`Referenced Source attribute '${s}' does not exist`);if(i.includes(s))throw new Error(`Cyclic attribute dependency: ${[...i,s].join(" -> ")}`);i.push(s);try{let o=r.get(s),l=typeof s=="string"?Qe(o):null,u=e.get(s);if(l){let c=d=>d?a(d):e.get(s);if(l.expression){let d=ti(l.body);u=t(s,o,d,d.slots.map(c))}else u=ei(l.body,c),e.get(s)==null&&(u=null)}return n.set(s,u),u}finally{i.pop()}};return new Map([...r.keys()].map(s=>[s,a(s)]))}function ri(r,e){let t=new Map([...Object.entries(r.getAttr()),...r.fixedAttrItems()]),n=new Set,i=[],a=s=>{let o=Qe(s);if(!o)return;let l=[];o.expression?l.push(...ti(o.body).slots):ei(o.body,u=>(l.push(u),""));for(let u of l.filter(Boolean)){if(!t.has(u))throw new Error(`Referenced Source attribute '${u}' does not exist`);if(i.includes(u))throw new Error(`Cyclic attribute dependency: ${[...i,u].join(" -> ")}`);n.has(u)||(i.push(u),a(t.get(u)),i.pop(),n.add(u))}};return a(e),n}/*!
|
|
10
10
|
* decimal.js v10.6.0
|
|
11
11
|
* An arbitrary-precision Decimal type for JavaScript.
|
|
12
12
|
* https://github.com/MikeMcl/decimal.js
|
|
13
13
|
* Copyright (c) 2025 Michael Mclaughlin <M8ch88l@gmail.com>
|
|
14
14
|
* MIT Licence
|
|
15
|
-
*/var St=9e15,nt=1e9,ta="0123456789abcdef",Jr="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",Kr="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",ra={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-St,maxE:St,crypto:!1},Ei,ze,N=!0,en="[DecimalError] ",rt=en+"Invalid argument: ",ki=en+"Precision limit exceeded",Ai=en+"crypto unavailable",Di="[object Decimal]",fe=Math.floor,re=Math.pow,bl=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,_l=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,wl=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,Ti=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Ce=1e7,T=7,yl=9007199254740991,vl=Jr.length-1,na=Kr.length-1,_={toStringTag:Di};_.absoluteValue=_.abs=function(){var r=new this.constructor(this);return r.s<0&&(r.s=1),k(r)};_.ceil=function(){return k(new this.constructor(this),this.e+1,2)};_.clampedTo=_.clamp=function(r,e){var t,n=this,a=n.constructor;if(r=new a(r),e=new a(e),!r.s||!e.s)return new a(NaN);if(r.gt(e))throw Error(rt+e);return t=n.cmp(r),t<0?r:n.cmp(e)>0?e:new a(n)};_.comparedTo=_.cmp=function(r){var e,t,n,a,i=this,s=i.d,o=(r=new i.constructor(r)).d,l=i.s,u=r.s;if(!s||!o)return!l||!u?NaN:l!==u?l:s===o?0:!s^l<0?1:-1;if(!s[0]||!o[0])return s[0]?l:o[0]?-u:0;if(l!==u)return l;if(i.e!==r.e)return i.e>r.e^l<0?1:-1;for(n=s.length,a=o.length,e=0,t=n<a?n:a;e<t;++e)if(s[e]!==o[e])return s[e]>o[e]^l<0?1:-1;return n===a?0:n>a^l<0?1:-1};_.cosine=_.cos=function(){var r,e,t=this,n=t.constructor;return t.d?t.d[0]?(r=n.precision,e=n.rounding,n.precision=r+Math.max(t.e,t.sd())+T,n.rounding=1,t=xl(n,Bi(n,t)),n.precision=r,n.rounding=e,k(ze==2||ze==3?t.neg():t,r,e,!0)):new n(1):new n(NaN)};_.cubeRoot=_.cbrt=function(){var r,e,t,n,a,i,s,o,l,u,c=this,d=c.constructor;if(!c.isFinite()||c.isZero())return new d(c);for(N=!1,i=c.s*re(c.s*c,1/3),!i||Math.abs(i)==1/0?(t=ue(c.d),r=c.e,(i=(r-t.length+1)%3)&&(t+=i==1||i==-2?"0":"00"),i=re(t,1/3),r=fe((r+1)/3)-(r%3==(r<0?-1:2)),i==1/0?t="5e"+r:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+r),n=new d(t),n.s=c.s):n=new d(i.toString()),s=(r=d.precision)+3;;)if(o=n,l=o.times(o).times(o),u=l.plus(c),n=W(u.plus(c).times(o),u.plus(l),s+2,1),ue(o.d).slice(0,s)===(t=ue(n.d)).slice(0,s))if(t=t.slice(s-3,s+1),t=="9999"||!a&&t=="4999"){if(!a&&(k(o,r+1,0),o.times(o).times(o).eq(c))){n=o;break}s+=4,a=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(k(n,r+1,1),e=!n.times(n).times(n).eq(c));break}return N=!0,k(n,r,d.rounding,e)};_.decimalPlaces=_.dp=function(){var r,e=this.d,t=NaN;if(e){if(r=e.length-1,t=(r-fe(this.e/T))*T,r=e[r],r)for(;r%10==0;r/=10)t--;t<0&&(t=0)}return t};_.dividedBy=_.div=function(r){return W(this,new this.constructor(r))};_.dividedToIntegerBy=_.divToInt=function(r){var e=this,t=e.constructor;return k(W(e,new t(r),0,1,1),t.precision,t.rounding)};_.equals=_.eq=function(r){return this.cmp(r)===0};_.floor=function(){return k(new this.constructor(this),this.e+1,3)};_.greaterThan=_.gt=function(r){return this.cmp(r)>0};_.greaterThanOrEqualTo=_.gte=function(r){var e=this.cmp(r);return e==1||e===0};_.hyperbolicCosine=_.cosh=function(){var r,e,t,n,a,i=this,s=i.constructor,o=new s(1);if(!i.isFinite())return new s(i.s?1/0:NaN);if(i.isZero())return o;t=s.precision,n=s.rounding,s.precision=t+Math.max(i.e,i.sd())+4,s.rounding=1,a=i.d.length,a<32?(r=Math.ceil(a/3),e=(1/rn(4,r)).toString()):(r=16,e="2.3283064365386962890625e-10"),i=It(s,1,i.times(e),new s(1),!0);for(var l,u=r,c=new s(8);u--;)l=i.times(i),i=o.minus(l.times(c.minus(l.times(c))));return k(i,s.precision=t,s.rounding=n,!0)};_.hyperbolicSine=_.sinh=function(){var r,e,t,n,a=this,i=a.constructor;if(!a.isFinite()||a.isZero())return new i(a);if(e=i.precision,t=i.rounding,i.precision=e+Math.max(a.e,a.sd())+4,i.rounding=1,n=a.d.length,n<3)a=It(i,2,a,a,!0);else{r=1.4*Math.sqrt(n),r=r>16?16:r|0,a=a.times(1/rn(5,r)),a=It(i,2,a,a,!0);for(var s,o=new i(5),l=new i(16),u=new i(20);r--;)s=a.times(a),a=a.times(o.plus(s.times(l.times(s).plus(u))))}return i.precision=e,i.rounding=t,k(a,e,t,!0)};_.hyperbolicTangent=_.tanh=function(){var r,e,t=this,n=t.constructor;return t.isFinite()?t.isZero()?new n(t):(r=n.precision,e=n.rounding,n.precision=r+7,n.rounding=1,W(t.sinh(),t.cosh(),n.precision=r,n.rounding=e)):new n(t.s)};_.inverseCosine=_.acos=function(){var r=this,e=r.constructor,t=r.abs().cmp(1),n=e.precision,a=e.rounding;return t!==-1?t===0?r.isNeg()?Oe(e,n,a):new e(0):new e(NaN):r.isZero()?Oe(e,n+4,a).times(.5):(e.precision=n+6,e.rounding=1,r=new e(1).minus(r).div(r.plus(1)).sqrt().atan(),e.precision=n,e.rounding=a,r.times(2))};_.inverseHyperbolicCosine=_.acosh=function(){var r,e,t=this,n=t.constructor;return t.lte(1)?new n(t.eq(1)?0:NaN):t.isFinite()?(r=n.precision,e=n.rounding,n.precision=r+Math.max(Math.abs(t.e),t.sd())+4,n.rounding=1,N=!1,t=t.times(t).minus(1).sqrt().plus(t),N=!0,n.precision=r,n.rounding=e,t.ln()):new n(t)};_.inverseHyperbolicSine=_.asinh=function(){var r,e,t=this,n=t.constructor;return!t.isFinite()||t.isZero()?new n(t):(r=n.precision,e=n.rounding,n.precision=r+2*Math.max(Math.abs(t.e),t.sd())+6,n.rounding=1,N=!1,t=t.times(t).plus(1).sqrt().plus(t),N=!0,n.precision=r,n.rounding=e,t.ln())};_.inverseHyperbolicTangent=_.atanh=function(){var r,e,t,n,a=this,i=a.constructor;return a.isFinite()?a.e>=0?new i(a.abs().eq(1)?a.s/0:a.isZero()?a:NaN):(r=i.precision,e=i.rounding,n=a.sd(),Math.max(n,r)<2*-a.e-1?k(new i(a),r,e,!0):(i.precision=t=n-a.e,a=W(a.plus(1),new i(1).minus(a),t+r,1),i.precision=r+4,i.rounding=1,a=a.ln(),i.precision=r,i.rounding=e,a.times(.5))):new i(NaN)};_.inverseSine=_.asin=function(){var r,e,t,n,a=this,i=a.constructor;return a.isZero()?new i(a):(e=a.abs().cmp(1),t=i.precision,n=i.rounding,e!==-1?e===0?(r=Oe(i,t+4,n).times(.5),r.s=a.s,r):new i(NaN):(i.precision=t+6,i.rounding=1,a=a.div(new i(1).minus(a.times(a)).sqrt().plus(1)).atan(),i.precision=t,i.rounding=n,a.times(2)))};_.inverseTangent=_.atan=function(){var r,e,t,n,a,i,s,o,l,u=this,c=u.constructor,d=c.precision,f=c.rounding;if(u.isFinite()){if(u.isZero())return new c(u);if(u.abs().eq(1)&&d+4<=na)return s=Oe(c,d+4,f).times(.25),s.s=u.s,s}else{if(!u.s)return new c(NaN);if(d+4<=na)return s=Oe(c,d+4,f).times(.5),s.s=u.s,s}for(c.precision=o=d+10,c.rounding=1,t=Math.min(28,o/T+2|0),r=t;r;--r)u=u.div(u.times(u).plus(1).sqrt().plus(1));for(N=!1,e=Math.ceil(o/T),n=1,l=u.times(u),s=new c(u),a=u;r!==-1;)if(a=a.times(l),i=s.minus(a.div(n+=2)),a=a.times(l),s=i.plus(a.div(n+=2)),s.d[e]!==void 0)for(r=e;s.d[r]===i.d[r]&&r--;);return t&&(s=s.times(2<<t-1)),N=!0,k(s,c.precision=d,c.rounding=f,!0)};_.isFinite=function(){return!!this.d};_.isInteger=_.isInt=function(){return!!this.d&&fe(this.e/T)>this.d.length-2};_.isNaN=function(){return!this.s};_.isNegative=_.isNeg=function(){return this.s<0};_.isPositive=_.isPos=function(){return this.s>0};_.isZero=function(){return!!this.d&&this.d[0]===0};_.lessThan=_.lt=function(r){return this.cmp(r)<0};_.lessThanOrEqualTo=_.lte=function(r){return this.cmp(r)<1};_.logarithm=_.log=function(r){var e,t,n,a,i,s,o,l,u=this,c=u.constructor,d=c.precision,f=c.rounding,p=5;if(r==null)r=new c(10),e=!0;else{if(r=new c(r),t=r.d,r.s<0||!t||!t[0]||r.eq(1))return new c(NaN);e=r.eq(10)}if(t=u.d,u.s<0||!t||!t[0]||u.eq(1))return new c(t&&!t[0]?-1/0:u.s!=1?NaN:t?0:1/0);if(e)if(t.length>1)i=!0;else{for(a=t[0];a%10===0;)a/=10;i=a!==1}if(N=!1,o=d+p,s=tt(u,o),n=e?Qr(c,o+10):tt(r,o),l=W(s,n,o,1),nr(l.d,a=d,f))do if(o+=10,s=tt(u,o),n=e?Qr(c,o+10):tt(r,o),l=W(s,n,o,1),!i){+ue(l.d).slice(a+1,a+15)+1==1e14&&(l=k(l,d+1,0));break}while(nr(l.d,a+=10,f));return N=!0,k(l,d,f)};_.minus=_.sub=function(r){var e,t,n,a,i,s,o,l,u,c,d,f,p=this,h=p.constructor;if(r=new h(r),!p.d||!r.d)return!p.s||!r.s?r=new h(NaN):p.d?r.s=-r.s:r=new h(r.d||p.s!==r.s?p:NaN),r;if(p.s!=r.s)return r.s=-r.s,p.plus(r);if(u=p.d,f=r.d,o=h.precision,l=h.rounding,!u[0]||!f[0]){if(f[0])r.s=-r.s;else if(u[0])r=new h(p);else return new h(l===3?-0:0);return N?k(r,o,l):r}if(t=fe(r.e/T),c=fe(p.e/T),u=u.slice(),i=c-t,i){for(d=i<0,d?(e=u,i=-i,s=f.length):(e=f,t=c,s=u.length),n=Math.max(Math.ceil(o/T),s)+2,i>n&&(i=n,e.length=1),e.reverse(),n=i;n--;)e.push(0);e.reverse()}else{for(n=u.length,s=f.length,d=n<s,d&&(s=n),n=0;n<s;n++)if(u[n]!=f[n]){d=u[n]<f[n];break}i=0}for(d&&(e=u,u=f,f=e,r.s=-r.s),s=u.length,n=f.length-s;n>0;--n)u[s++]=0;for(n=f.length;n>i;){if(u[--n]<f[n]){for(a=n;a&&u[--a]===0;)u[a]=Ce-1;--u[a],u[n]+=Ce}u[n]-=f[n]}for(;u[--s]===0;)u.pop();for(;u[0]===0;u.shift())--t;return u[0]?(r.d=u,r.e=tn(u,t),N?k(r,o,l):r):new h(l===3?-0:0)};_.modulo=_.mod=function(r){var e,t=this,n=t.constructor;return r=new n(r),!t.d||!r.s||r.d&&!r.d[0]?new n(NaN):!r.d||t.d&&!t.d[0]?k(new n(t),n.precision,n.rounding):(N=!1,n.modulo==9?(e=W(t,r.abs(),0,3,1),e.s*=r.s):e=W(t,r,0,n.modulo,1),e=e.times(r),N=!0,t.minus(e))};_.naturalExponential=_.exp=function(){return aa(this)};_.naturalLogarithm=_.ln=function(){return tt(this)};_.negated=_.neg=function(){var r=new this.constructor(this);return r.s=-r.s,k(r)};_.plus=_.add=function(r){var e,t,n,a,i,s,o,l,u,c,d=this,f=d.constructor;if(r=new f(r),!d.d||!r.d)return!d.s||!r.s?r=new f(NaN):d.d||(r=new f(r.d||d.s===r.s?d:NaN)),r;if(d.s!=r.s)return r.s=-r.s,d.minus(r);if(u=d.d,c=r.d,o=f.precision,l=f.rounding,!u[0]||!c[0])return c[0]||(r=new f(d)),N?k(r,o,l):r;if(i=fe(d.e/T),n=fe(r.e/T),u=u.slice(),a=i-n,a){for(a<0?(t=u,a=-a,s=c.length):(t=c,n=i,s=u.length),i=Math.ceil(o/T),s=i>s?i+1:s+1,a>s&&(a=s,t.length=1),t.reverse();a--;)t.push(0);t.reverse()}for(s=u.length,a=c.length,s-a<0&&(a=s,t=c,c=u,u=t),e=0;a;)e=(u[--a]=u[a]+c[a]+e)/Ce|0,u[a]%=Ce;for(e&&(u.unshift(e),++n),s=u.length;u[--s]==0;)u.pop();return r.d=u,r.e=tn(u,n),N?k(r,o,l):r};_.precision=_.sd=function(r){var e,t=this;if(r!==void 0&&r!==!!r&&r!==1&&r!==0)throw Error(rt+r);return t.d?(e=Ci(t.d),r&&t.e+1>e&&(e=t.e+1)):e=NaN,e};_.round=function(){var r=this,e=r.constructor;return k(new e(r),r.e+1,e.rounding)};_.sine=_.sin=function(){var r,e,t=this,n=t.constructor;return t.isFinite()?t.isZero()?new n(t):(r=n.precision,e=n.rounding,n.precision=r+Math.max(t.e,t.sd())+T,n.rounding=1,t=kl(n,Bi(n,t)),n.precision=r,n.rounding=e,k(ze>2?t.neg():t,r,e,!0)):new n(NaN)};_.squareRoot=_.sqrt=function(){var r,e,t,n,a,i,s=this,o=s.d,l=s.e,u=s.s,c=s.constructor;if(u!==1||!o||!o[0])return new c(!u||u<0&&(!o||o[0])?NaN:o?s:1/0);for(N=!1,u=Math.sqrt(+s),u==0||u==1/0?(e=ue(o),(e.length+l)%2==0&&(e+="0"),u=Math.sqrt(e),l=fe((l+1)/2)-(l<0||l%2),u==1/0?e="5e"+l:(e=u.toExponential(),e=e.slice(0,e.indexOf("e")+1)+l),n=new c(e)):n=new c(u.toString()),t=(l=c.precision)+3;;)if(i=n,n=i.plus(W(s,i,t+2,1)).times(.5),ue(i.d).slice(0,t)===(e=ue(n.d)).slice(0,t))if(e=e.slice(t-3,t+1),e=="9999"||!a&&e=="4999"){if(!a&&(k(i,l+1,0),i.times(i).eq(s))){n=i;break}t+=4,a=1}else{(!+e||!+e.slice(1)&&e.charAt(0)=="5")&&(k(n,l+1,1),r=!n.times(n).eq(s));break}return N=!0,k(n,l,c.rounding,r)};_.tangent=_.tan=function(){var r,e,t=this,n=t.constructor;return t.isFinite()?t.isZero()?new n(t):(r=n.precision,e=n.rounding,n.precision=r+10,n.rounding=1,t=t.sin(),t.s=1,t=W(t,new n(1).minus(t.times(t)).sqrt(),r+10,0),n.precision=r,n.rounding=e,k(ze==2||ze==4?t.neg():t,r,e,!0)):new n(NaN)};_.times=_.mul=function(r){var e,t,n,a,i,s,o,l,u,c=this,d=c.constructor,f=c.d,p=(r=new d(r)).d;if(r.s*=c.s,!f||!f[0]||!p||!p[0])return new d(!r.s||f&&!f[0]&&!p||p&&!p[0]&&!f?NaN:!f||!p?r.s/0:r.s*0);for(t=fe(c.e/T)+fe(r.e/T),l=f.length,u=p.length,l<u&&(i=f,f=p,p=i,s=l,l=u,u=s),i=[],s=l+u,n=s;n--;)i.push(0);for(n=u;--n>=0;){for(e=0,a=l+n;a>n;)o=i[a]+p[n]*f[a-n-1]+e,i[a--]=o%Ce|0,e=o/Ce|0;i[a]=(i[a]+e)%Ce|0}for(;!i[--s];)i.pop();return e?++t:i.shift(),r.d=i,r.e=tn(i,t),N?k(r,d.precision,d.rounding):r};_.toBinary=function(r,e){return ia(this,2,r,e)};_.toDecimalPlaces=_.toDP=function(r,e){var t=this,n=t.constructor;return t=new n(t),r===void 0?t:(be(r,0,nt),e===void 0?e=n.rounding:be(e,0,8),k(t,r+t.e+1,e))};_.toExponential=function(r,e){var t,n=this,a=n.constructor;return r===void 0?t=Me(n,!0):(be(r,0,nt),e===void 0?e=a.rounding:be(e,0,8),n=k(new a(n),r+1,e),t=Me(n,!0,r+1)),n.isNeg()&&!n.isZero()?"-"+t:t};_.toFixed=function(r,e){var t,n,a=this,i=a.constructor;return r===void 0?t=Me(a):(be(r,0,nt),e===void 0?e=i.rounding:be(e,0,8),n=k(new i(a),r+a.e+1,e),t=Me(n,!1,r+n.e+1)),a.isNeg()&&!a.isZero()?"-"+t:t};_.toFraction=function(r){var e,t,n,a,i,s,o,l,u,c,d,f,p=this,h=p.d,m=p.constructor;if(!h)return new m(p);if(u=t=new m(1),n=l=new m(0),e=new m(n),i=e.e=Ci(h)-p.e-1,s=i%T,e.d[0]=re(10,s<0?T+s:s),r==null)r=i>0?e:u;else{if(o=new m(r),!o.isInt()||o.lt(u))throw Error(rt+o);r=o.gt(e)?i>0?e:u:o}for(N=!1,o=new m(ue(h)),c=m.precision,m.precision=i=h.length*T*2;d=W(o,e,0,1,1),a=t.plus(d.times(n)),a.cmp(r)!=1;)t=n,n=a,a=u,u=l.plus(d.times(a)),l=a,a=e,e=o.minus(d.times(a)),o=a;return a=W(r.minus(t),n,0,1,1),l=l.plus(a.times(u)),t=t.plus(a.times(n)),l.s=u.s=p.s,f=W(u,n,i,1).minus(p).abs().cmp(W(l,t,i,1).minus(p).abs())<1?[u,n]:[l,t],m.precision=c,N=!0,f};_.toHexadecimal=_.toHex=function(r,e){return ia(this,16,r,e)};_.toNearest=function(r,e){var t=this,n=t.constructor;if(t=new n(t),r==null){if(!t.d)return t;r=new n(1),e=n.rounding}else{if(r=new n(r),e===void 0?e=n.rounding:be(e,0,8),!t.d)return r.s?t:r;if(!r.d)return r.s&&(r.s=t.s),r}return r.d[0]?(N=!1,t=W(t,r,0,e,1).times(r),N=!0,k(t)):(r.s=t.s,t=r),t};_.toNumber=function(){return+this};_.toOctal=function(r,e){return ia(this,8,r,e)};_.toPower=_.pow=function(r){var e,t,n,a,i,s,o=this,l=o.constructor,u=+(r=new l(r));if(!o.d||!r.d||!o.d[0]||!r.d[0])return new l(re(+o,u));if(o=new l(o),o.eq(1))return o;if(n=l.precision,i=l.rounding,r.eq(1))return k(o,n,i);if(e=fe(r.e/T),e>=r.d.length-1&&(t=u<0?-u:u)<=yl)return a=Ni(l,o,t,n),r.s<0?new l(1).div(a):k(a,n,i);if(s=o.s,s<0){if(e<r.d.length-1)return new l(NaN);if((r.d[e]&1)==0&&(s=1),o.e==0&&o.d[0]==1&&o.d.length==1)return o.s=s,o}return t=re(+o,u),e=t==0||!isFinite(t)?fe(u*(Math.log("0."+ue(o.d))/Math.LN10+o.e+1)):new l(t+"").e,e>l.maxE+1||e<l.minE-1?new l(e>0?s/0:0):(N=!1,l.rounding=o.s=1,t=Math.min(12,(e+"").length),a=aa(r.times(tt(o,n+t)),n),a.d&&(a=k(a,n+5,1),nr(a.d,n,i)&&(e=n+10,a=k(aa(r.times(tt(o,e+t)),e),e+5,1),+ue(a.d).slice(n+1,n+15)+1==1e14&&(a=k(a,n+1,0)))),a.s=s,N=!0,l.rounding=i,k(a,n,i))};_.toPrecision=function(r,e){var t,n=this,a=n.constructor;return r===void 0?t=Me(n,n.e<=a.toExpNeg||n.e>=a.toExpPos):(be(r,1,nt),e===void 0?e=a.rounding:be(e,0,8),n=k(new a(n),r,e),t=Me(n,r<=n.e||n.e<=a.toExpNeg,r)),n.isNeg()&&!n.isZero()?"-"+t:t};_.toSignificantDigits=_.toSD=function(r,e){var t=this,n=t.constructor;return r===void 0?(r=n.precision,e=n.rounding):(be(r,1,nt),e===void 0?e=n.rounding:be(e,0,8)),k(new n(t),r,e)};_.toString=function(){var r=this,e=r.constructor,t=Me(r,r.e<=e.toExpNeg||r.e>=e.toExpPos);return r.isNeg()&&!r.isZero()?"-"+t:t};_.truncated=_.trunc=function(){return k(new this.constructor(this),this.e+1,1)};_.valueOf=_.toJSON=function(){var r=this,e=r.constructor,t=Me(r,r.e<=e.toExpNeg||r.e>=e.toExpPos);return r.isNeg()?"-"+t:t};function ue(r){var e,t,n,a=r.length-1,i="",s=r[0];if(a>0){for(i+=s,e=1;e<a;e++)n=r[e]+"",t=T-n.length,t&&(i+=et(t)),i+=n;s=r[e],n=s+"",t=T-n.length,t&&(i+=et(t))}else if(s===0)return"0";for(;s%10===0;)s/=10;return i+s}function be(r,e,t){if(r!==~~r||r<e||r>t)throw Error(rt+r)}function nr(r,e,t,n){var a,i,s,o;for(i=r[0];i>=10;i/=10)--e;return--e<0?(e+=T,a=0):(a=Math.ceil((e+1)/T),e%=T),i=re(10,T-e),o=r[a]%i|0,n==null?e<3?(e==0?o=o/100|0:e==1&&(o=o/10|0),s=t<4&&o==99999||t>3&&o==49999||o==5e4||o==0):s=(t<4&&o+1==i||t>3&&o+1==i/2)&&(r[a+1]/i/100|0)==re(10,e-2)-1||(o==i/2||o==0)&&(r[a+1]/i/100|0)==0:e<4?(e==0?o=o/1e3|0:e==1?o=o/100|0:e==2&&(o=o/10|0),s=(n||t<4)&&o==9999||!n&&t>3&&o==4999):s=((n||t<4)&&o+1==i||!n&&t>3&&o+1==i/2)&&(r[a+1]/i/1e3|0)==re(10,e-3)-1,s}function Yr(r,e,t){for(var n,a=[0],i,s=0,o=r.length;s<o;){for(i=a.length;i--;)a[i]*=e;for(a[0]+=ta.indexOf(r.charAt(s++)),n=0;n<a.length;n++)a[n]>t-1&&(a[n+1]===void 0&&(a[n+1]=0),a[n+1]+=a[n]/t|0,a[n]%=t)}return a.reverse()}function xl(r,e){var t,n,a;if(e.isZero())return e;n=e.d.length,n<32?(t=Math.ceil(n/3),a=(1/rn(4,t)).toString()):(t=16,a="2.3283064365386962890625e-10"),r.precision+=t,e=It(r,1,e.times(a),new r(1));for(var i=t;i--;){var s=e.times(e);e=s.times(s).minus(s).times(8).plus(1)}return r.precision-=t,e}var W=(function(){function r(n,a,i){var s,o=0,l=n.length;for(n=n.slice();l--;)s=n[l]*a+o,n[l]=s%i|0,o=s/i|0;return o&&n.unshift(o),n}function e(n,a,i,s){var o,l;if(i!=s)l=i>s?1:-1;else for(o=l=0;o<i;o++)if(n[o]!=a[o]){l=n[o]>a[o]?1:-1;break}return l}function t(n,a,i,s){for(var o=0;i--;)n[i]-=o,o=n[i]<a[i]?1:0,n[i]=o*s+n[i]-a[i];for(;!n[0]&&n.length>1;)n.shift()}return function(n,a,i,s,o,l){var u,c,d,f,p,h,m,g,b,y,v,w,D,A,$,R,z,me,M,V,te=n.constructor,U=n.s==a.s?1:-1,Q=n.d,B=a.d;if(!Q||!Q[0]||!B||!B[0])return new te(!n.s||!a.s||(Q?B&&Q[0]==B[0]:!B)?NaN:Q&&Q[0]==0||!B?U*0:U/0);for(l?(p=1,c=n.e-a.e):(l=Ce,p=T,c=fe(n.e/p)-fe(a.e/p)),M=B.length,z=Q.length,b=new te(U),y=b.d=[],d=0;B[d]==(Q[d]||0);d++);if(B[d]>(Q[d]||0)&&c--,i==null?(A=i=te.precision,s=te.rounding):o?A=i+(n.e-a.e)+1:A=i,A<0)y.push(1),h=!0;else{if(A=A/p+2|0,d=0,M==1){for(f=0,B=B[0],A++;(d<z||f)&&A--;d++)$=f*l+(Q[d]||0),y[d]=$/B|0,f=$%B|0;h=f||d<z}else{for(f=l/(B[0]+1)|0,f>1&&(B=r(B,f,l),Q=r(Q,f,l),M=B.length,z=Q.length),R=M,v=Q.slice(0,M),w=v.length;w<M;)v[w++]=0;V=B.slice(),V.unshift(0),me=B[0],B[1]>=l/2&&++me;do f=0,u=e(B,v,M,w),u<0?(D=v[0],M!=w&&(D=D*l+(v[1]||0)),f=D/me|0,f>1?(f>=l&&(f=l-1),m=r(B,f,l),g=m.length,w=v.length,u=e(m,v,g,w),u==1&&(f--,t(m,M<g?V:B,g,l))):(f==0&&(u=f=1),m=B.slice()),g=m.length,g<w&&m.unshift(0),t(v,m,w,l),u==-1&&(w=v.length,u=e(B,v,M,w),u<1&&(f++,t(v,M<w?V:B,w,l))),w=v.length):u===0&&(f++,v=[0]),y[d++]=f,u&&v[0]?v[w++]=Q[R]||0:(v=[Q[R]],w=1);while((R++<z||v[0]!==void 0)&&A--);h=v[0]!==void 0}y[0]||y.shift()}if(p==1)b.e=c,Ei=h;else{for(d=1,f=y[0];f>=10;f/=10)d++;b.e=d+c*p-1,k(b,o?i+b.e+1:i,s,h)}return b}})();function k(r,e,t,n){var a,i,s,o,l,u,c,d,f,p=r.constructor;e:if(e!=null){if(d=r.d,!d)return r;for(a=1,o=d[0];o>=10;o/=10)a++;if(i=e-a,i<0)i+=T,s=e,c=d[f=0],l=c/re(10,a-s-1)%10|0;else if(f=Math.ceil((i+1)/T),o=d.length,f>=o)if(n){for(;o++<=f;)d.push(0);c=l=0,a=1,i%=T,s=i-T+1}else break e;else{for(c=o=d[f],a=1;o>=10;o/=10)a++;i%=T,s=i-T+a,l=s<0?0:c/re(10,a-s-1)%10|0}if(n=n||e<0||d[f+1]!==void 0||(s<0?c:c%re(10,a-s-1)),u=t<4?(l||n)&&(t==0||t==(r.s<0?3:2)):l>5||l==5&&(t==4||n||t==6&&(i>0?s>0?c/re(10,a-s):0:d[f-1])%10&1||t==(r.s<0?8:7)),e<1||!d[0])return d.length=0,u?(e-=r.e+1,d[0]=re(10,(T-e%T)%T),r.e=-e||0):d[0]=r.e=0,r;if(i==0?(d.length=f,o=1,f--):(d.length=f+1,o=re(10,T-i),d[f]=s>0?(c/re(10,a-s)%re(10,s)|0)*o:0),u)for(;;)if(f==0){for(i=1,s=d[0];s>=10;s/=10)i++;for(s=d[0]+=o,o=1;s>=10;s/=10)o++;i!=o&&(r.e++,d[0]==Ce&&(d[0]=1));break}else{if(d[f]+=o,d[f]!=Ce)break;d[f--]=0,o=1}for(i=d.length;d[--i]===0;)d.pop()}return N&&(r.e>p.maxE?(r.d=null,r.e=NaN):r.e<p.minE&&(r.e=0,r.d=[0])),r}function Me(r,e,t){if(!r.isFinite())return Ii(r);var n,a=r.e,i=ue(r.d),s=i.length;return e?(t&&(n=t-s)>0?i=i.charAt(0)+"."+i.slice(1)+et(n):s>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(r.e<0?"e":"e+")+r.e):a<0?(i="0."+et(-a-1)+i,t&&(n=t-s)>0&&(i+=et(n))):a>=s?(i+=et(a+1-s),t&&(n=t-a-1)>0&&(i=i+"."+et(n))):((n=a+1)<s&&(i=i.slice(0,n)+"."+i.slice(n)),t&&(n=t-s)>0&&(a+1===s&&(i+="."),i+=et(n))),i}function tn(r,e){var t=r[0];for(e*=T;t>=10;t/=10)e++;return e}function Qr(r,e,t){if(e>vl)throw N=!0,t&&(r.precision=t),Error(ki);return k(new r(Jr),e,1,!0)}function Oe(r,e,t){if(e>na)throw Error(ki);return k(new r(Kr),e,t,!0)}function Ci(r){var e=r.length-1,t=e*T+1;if(e=r[e],e){for(;e%10==0;e/=10)t--;for(e=r[0];e>=10;e/=10)t++}return t}function et(r){for(var e="";r--;)e+="0";return e}function Ni(r,e,t,n){var a,i=new r(1),s=Math.ceil(n/T+4);for(N=!1;;){if(t%2&&(i=i.times(e),vi(i.d,s)&&(a=!0)),t=fe(t/2),t===0){t=i.d.length-1,a&&i.d[t]===0&&++i.d[t];break}e=e.times(e),vi(e.d,s)}return N=!0,i}function yi(r){return r.d[r.d.length-1]&1}function Si(r,e,t){for(var n,a,i=new r(e[0]),s=0;++s<e.length;){if(a=new r(e[s]),!a.s){i=a;break}n=i.cmp(a),(n===t||n===0&&i.s===t)&&(i=a)}return i}function aa(r,e){var t,n,a,i,s,o,l,u=0,c=0,d=0,f=r.constructor,p=f.rounding,h=f.precision;if(!r.d||!r.d[0]||r.e>17)return new f(r.d?r.d[0]?r.s<0?0:1/0:1:r.s?r.s<0?0:r:NaN);for(e==null?(N=!1,l=h):l=e,o=new f(.03125);r.e>-2;)r=r.times(o),d+=5;for(n=Math.log(re(2,d))/Math.LN10*2+5|0,l+=n,t=i=s=new f(1),f.precision=l;;){if(i=k(i.times(r),l,1),t=t.times(++c),o=s.plus(W(i,t,l,1)),ue(o.d).slice(0,l)===ue(s.d).slice(0,l)){for(a=d;a--;)s=k(s.times(s),l,1);if(e==null)if(u<3&&nr(s.d,l-n,p,u))f.precision=l+=10,t=i=o=new f(1),c=0,u++;else return k(s,f.precision=h,p,N=!0);else return f.precision=h,s}s=o}}function tt(r,e){var t,n,a,i,s,o,l,u,c,d,f,p=1,h=10,m=r,g=m.d,b=m.constructor,y=b.rounding,v=b.precision;if(m.s<0||!g||!g[0]||!m.e&&g[0]==1&&g.length==1)return new b(g&&!g[0]?-1/0:m.s!=1?NaN:g?0:m);if(e==null?(N=!1,c=v):c=e,b.precision=c+=h,t=ue(g),n=t.charAt(0),Math.abs(i=m.e)<15e14){for(;n<7&&n!=1||n==1&&t.charAt(1)>3;)m=m.times(r),t=ue(m.d),n=t.charAt(0),p++;i=m.e,n>1?(m=new b("0."+t),i++):m=new b(n+"."+t.slice(1))}else return u=Qr(b,c+2,v).times(i+""),m=tt(new b(n+"."+t.slice(1)),c-h).plus(u),b.precision=v,e==null?k(m,v,y,N=!0):m;for(d=m,l=s=m=W(m.minus(1),m.plus(1),c,1),f=k(m.times(m),c,1),a=3;;){if(s=k(s.times(f),c,1),u=l.plus(W(s,new b(a),c,1)),ue(u.d).slice(0,c)===ue(l.d).slice(0,c))if(l=l.times(2),i!==0&&(l=l.plus(Qr(b,c+2,v).times(i+""))),l=W(l,new b(p),c,1),e==null)if(nr(l.d,c-h,y,o))b.precision=c+=h,u=s=m=W(d.minus(1),d.plus(1),c,1),f=k(m.times(m),c,1),a=o=1;else return k(l,b.precision=v,y,N=!0);else return b.precision=v,l;l=u,a+=2}}function Ii(r){return String(r.s*r.s/0)}function Zr(r,e){var t,n,a;for((t=e.indexOf("."))>-1&&(e=e.replace(".","")),(n=e.search(/e/i))>0?(t<0&&(t=n),t+=+e.slice(n+1),e=e.substring(0,n)):t<0&&(t=e.length),n=0;e.charCodeAt(n)===48;n++);for(a=e.length;e.charCodeAt(a-1)===48;--a);if(e=e.slice(n,a),e){if(a-=n,r.e=t=t-n-1,r.d=[],n=(t+1)%T,t<0&&(n+=T),n<a){for(n&&r.d.push(+e.slice(0,n)),a-=T;n<a;)r.d.push(+e.slice(n,n+=T));e=e.slice(n),n=T-e.length}else n-=a;for(;n--;)e+="0";r.d.push(+e),N&&(r.e>r.constructor.maxE?(r.d=null,r.e=NaN):r.e<r.constructor.minE&&(r.e=0,r.d=[0]))}else r.e=0,r.d=[0];return r}function El(r,e){var t,n,a,i,s,o,l,u,c;if(e.indexOf("_")>-1){if(e=e.replace(/(\d)_(?=\d)/g,"$1"),Ti.test(e))return Zr(r,e)}else if(e==="Infinity"||e==="NaN")return+e||(r.s=NaN),r.e=NaN,r.d=null,r;if(_l.test(e))t=16,e=e.toLowerCase();else if(bl.test(e))t=2;else if(wl.test(e))t=8;else throw Error(rt+e);for(i=e.search(/p/i),i>0?(l=+e.slice(i+1),e=e.substring(2,i)):e=e.slice(2),i=e.indexOf("."),s=i>=0,n=r.constructor,s&&(e=e.replace(".",""),o=e.length,i=o-i,a=Ni(n,new n(t),i,i*2)),u=Yr(e,t,Ce),c=u.length-1,i=c;u[i]===0;--i)u.pop();return i<0?new n(r.s*0):(r.e=tn(u,c),r.d=u,N=!1,s&&(r=W(r,a,o*4)),l&&(r=r.times(Math.abs(l)<54?re(2,l):ar.pow(2,l))),N=!0,r)}function kl(r,e){var t,n=e.d.length;if(n<3)return e.isZero()?e:It(r,2,e,e);t=1.4*Math.sqrt(n),t=t>16?16:t|0,e=e.times(1/rn(5,t)),e=It(r,2,e,e);for(var a,i=new r(5),s=new r(16),o=new r(20);t--;)a=e.times(e),e=e.times(i.plus(a.times(s.times(a).minus(o))));return e}function It(r,e,t,n,a){var i,s,o,l,u=1,c=r.precision,d=Math.ceil(c/T);for(N=!1,l=t.times(t),o=new r(n);;){if(s=W(o.times(l),new r(e++*e++),c,1),o=a?n.plus(s):n.minus(s),n=W(s.times(l),new r(e++*e++),c,1),s=o.plus(n),s.d[d]!==void 0){for(i=d;s.d[i]===o.d[i]&&i--;);if(i==-1)break}i=o,o=n,n=s,s=i,u++}return N=!0,s.d.length=d+1,s}function rn(r,e){for(var t=r;--e;)t*=r;return t}function Bi(r,e){var t,n=e.s<0,a=Oe(r,r.precision,1),i=a.times(.5);if(e=e.abs(),e.lte(i))return ze=n?4:1,e;if(t=e.divToInt(a),t.isZero())ze=n?3:2;else{if(e=e.minus(t.times(a)),e.lte(i))return ze=yi(t)?n?2:3:n?4:1,e;ze=yi(t)?n?1:4:n?3:2}return e.minus(a).abs()}function ia(r,e,t,n){var a,i,s,o,l,u,c,d,f,p=r.constructor,h=t!==void 0;if(h?(be(t,1,nt),n===void 0?n=p.rounding:be(n,0,8)):(t=p.precision,n=p.rounding),!r.isFinite())c=Ii(r);else{for(c=Me(r),s=c.indexOf("."),h?(a=2,e==16?t=t*4-3:e==8&&(t=t*3-2)):a=e,s>=0&&(c=c.replace(".",""),f=new p(1),f.e=c.length-s,f.d=Yr(Me(f),10,a),f.e=f.d.length),d=Yr(c,10,a),i=l=d.length;d[--l]==0;)d.pop();if(!d[0])c=h?"0p+0":"0";else{if(s<0?i--:(r=new p(r),r.d=d,r.e=i,r=W(r,f,t,n,0,a),d=r.d,i=r.e,u=Ei),s=d[t],o=a/2,u=u||d[t+1]!==void 0,u=n<4?(s!==void 0||u)&&(n===0||n===(r.s<0?3:2)):s>o||s===o&&(n===4||u||n===6&&d[t-1]&1||n===(r.s<0?8:7)),d.length=t,u)for(;++d[--t]>a-1;)d[t]=0,t||(++i,d.unshift(1));for(l=d.length;!d[l-1];--l);for(s=0,c="";s<l;s++)c+=ta.charAt(d[s]);if(h){if(l>1)if(e==16||e==8){for(s=e==16?4:3,--l;l%s;l++)c+="0";for(d=Yr(c,a,e),l=d.length;!d[l-1];--l);for(s=1,c="1.";s<l;s++)c+=ta.charAt(d[s])}else c=c.charAt(0)+"."+c.slice(1);c=c+(i<0?"p":"p+")+i}else if(i<0){for(;++i;)c="0"+c;c="0."+c}else if(++i>l)for(i-=l;i--;)c+="0";else i<l&&(c=c.slice(0,i)+"."+c.slice(i))}c=(e==16?"0x":e==2?"0b":e==8?"0o":"")+c}return r.s<0?"-"+c:c}function vi(r,e){if(r.length>e)return r.length=e,!0}function Al(r){return new this(r).abs()}function Dl(r){return new this(r).acos()}function Tl(r){return new this(r).acosh()}function Cl(r,e){return new this(r).plus(e)}function Nl(r){return new this(r).asin()}function Sl(r){return new this(r).asinh()}function Il(r){return new this(r).atan()}function Bl(r){return new this(r).atanh()}function Ol(r,e){r=new this(r),e=new this(e);var t,n=this.precision,a=this.rounding,i=n+4;return!r.s||!e.s?t=new this(NaN):!r.d&&!e.d?(t=Oe(this,i,1).times(e.s>0?.25:.75),t.s=r.s):!e.d||r.isZero()?(t=e.s<0?Oe(this,n,a):new this(0),t.s=r.s):!r.d||e.isZero()?(t=Oe(this,i,1).times(.5),t.s=r.s):e.s<0?(this.precision=i,this.rounding=1,t=this.atan(W(r,e,i,1)),e=Oe(this,i,1),this.precision=n,this.rounding=a,t=r.s<0?t.minus(e):t.plus(e)):t=this.atan(W(r,e,i,1)),t}function Ml(r){return new this(r).cbrt()}function Rl(r){return k(r=new this(r),r.e+1,2)}function Ll(r,e,t){return new this(r).clamp(e,t)}function Pl(r){if(!r||typeof r!="object")throw Error(en+"Object expected");var e,t,n,a=r.defaults===!0,i=["precision",1,nt,"rounding",0,8,"toExpNeg",-St,0,"toExpPos",0,St,"maxE",0,St,"minE",-St,0,"modulo",0,9];for(e=0;e<i.length;e+=3)if(t=i[e],a&&(this[t]=ra[t]),(n=r[t])!==void 0)if(fe(n)===n&&n>=i[e+1]&&n<=i[e+2])this[t]=n;else throw Error(rt+t+": "+n);if(t="crypto",a&&(this[t]=ra[t]),(n=r[t])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[t]=!0;else throw Error(Ai);else this[t]=!1;else throw Error(rt+t+": "+n);return this}function $l(r){return new this(r).cos()}function Fl(r){return new this(r).cosh()}function Oi(r){var e,t,n;function a(i){var s,o,l,u=this;if(!(u instanceof a))return new a(i);if(u.constructor=a,xi(i)){u.s=i.s,N?!i.d||i.e>a.maxE?(u.e=NaN,u.d=null):i.e<a.minE?(u.e=0,u.d=[0]):(u.e=i.e,u.d=i.d.slice()):(u.e=i.e,u.d=i.d?i.d.slice():i.d);return}if(l=typeof i,l==="number"){if(i===0){u.s=1/i<0?-1:1,u.e=0,u.d=[0];return}if(i<0?(i=-i,u.s=-1):u.s=1,i===~~i&&i<1e7){for(s=0,o=i;o>=10;o/=10)s++;N?s>a.maxE?(u.e=NaN,u.d=null):s<a.minE?(u.e=0,u.d=[0]):(u.e=s,u.d=[i]):(u.e=s,u.d=[i]);return}if(i*0!==0){i||(u.s=NaN),u.e=NaN,u.d=null;return}return Zr(u,i.toString())}if(l==="string")return(o=i.charCodeAt(0))===45?(i=i.slice(1),u.s=-1):(o===43&&(i=i.slice(1)),u.s=1),Ti.test(i)?Zr(u,i):El(u,i);if(l==="bigint")return i<0?(i=-i,u.s=-1):u.s=1,Zr(u,i.toString());throw Error(rt+i)}if(a.prototype=_,a.ROUND_UP=0,a.ROUND_DOWN=1,a.ROUND_CEIL=2,a.ROUND_FLOOR=3,a.ROUND_HALF_UP=4,a.ROUND_HALF_DOWN=5,a.ROUND_HALF_EVEN=6,a.ROUND_HALF_CEIL=7,a.ROUND_HALF_FLOOR=8,a.EUCLID=9,a.config=a.set=Pl,a.clone=Oi,a.isDecimal=xi,a.abs=Al,a.acos=Dl,a.acosh=Tl,a.add=Cl,a.asin=Nl,a.asinh=Sl,a.atan=Il,a.atanh=Bl,a.atan2=Ol,a.cbrt=Ml,a.ceil=Rl,a.clamp=Ll,a.cos=$l,a.cosh=Fl,a.div=Ul,a.exp=ql,a.floor=jl,a.hypot=zl,a.ln=Vl,a.log=Hl,a.log10=Gl,a.log2=Wl,a.max=Xl,a.min=Yl,a.mod=Zl,a.mul=Jl,a.pow=Kl,a.random=Ql,a.round=eu,a.sign=tu,a.sin=ru,a.sinh=nu,a.sqrt=au,a.sub=iu,a.sum=su,a.tan=ou,a.tanh=lu,a.trunc=uu,r===void 0&&(r={}),r&&r.defaults!==!0)for(n=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],e=0;e<n.length;)r.hasOwnProperty(t=n[e++])||(r[t]=this[t]);return a.config(r),a}function Ul(r,e){return new this(r).div(e)}function ql(r){return new this(r).exp()}function jl(r){return k(r=new this(r),r.e+1,3)}function zl(){var r,e,t=new this(0);for(N=!1,r=0;r<arguments.length;)if(e=new this(arguments[r++]),e.d)t.d&&(t=t.plus(e.times(e)));else{if(e.s)return N=!0,new this(1/0);t=e}return N=!0,t.sqrt()}function xi(r){return r instanceof ar||r&&r.toStringTag===Di||!1}function Vl(r){return new this(r).ln()}function Hl(r,e){return new this(r).log(e)}function Wl(r){return new this(r).log(2)}function Gl(r){return new this(r).log(10)}function Xl(){return Si(this,arguments,-1)}function Yl(){return Si(this,arguments,1)}function Zl(r,e){return new this(r).mod(e)}function Jl(r,e){return new this(r).mul(e)}function Kl(r,e){return new this(r).pow(e)}function Ql(r){var e,t,n,a,i=0,s=new this(1),o=[];if(r===void 0?r=this.precision:be(r,1,nt),n=Math.ceil(r/T),this.crypto)if(crypto.getRandomValues)for(e=crypto.getRandomValues(new Uint32Array(n));i<n;)a=e[i],a>=429e7?e[i]=crypto.getRandomValues(new Uint32Array(1))[0]:o[i++]=a%1e7;else if(crypto.randomBytes){for(e=crypto.randomBytes(n*=4);i<n;)a=e[i]+(e[i+1]<<8)+(e[i+2]<<16)+((e[i+3]&127)<<24),a>=214e7?crypto.randomBytes(4).copy(e,i):(o.push(a%1e7),i+=4);i=n/4}else throw Error(Ai);else for(;i<n;)o[i++]=Math.random()*1e7|0;for(n=o[--i],r%=T,n&&r&&(a=re(10,T-r),o[i]=(n/a|0)*a);o[i]===0;i--)o.pop();if(i<0)t=0,o=[0];else{for(t=-1;o[0]===0;t-=T)o.shift();for(n=1,a=o[0];a>=10;a/=10)n++;n<T&&(t-=T-n)}return s.e=t,s.d=o,s}function eu(r){return k(r=new this(r),r.e+1,this.rounding)}function tu(r){return r=new this(r),r.d?r.d[0]?r.s:0*r.s:r.s||NaN}function ru(r){return new this(r).sin()}function nu(r){return new this(r).sinh()}function au(r){return new this(r).sqrt()}function iu(r,e){return new this(r).sub(e)}function su(){var r=0,e=arguments,t=new this(e[r]);for(N=!1;t.s&&++r<e.length;)t=t.plus(e[r]);return N=!0,k(t,this.precision,this.rounding)}function ou(r){return new this(r).tan()}function lu(r){return new this(r).tanh()}function uu(r){return k(r=new this(r),r.e+1,1)}_[Symbol.for("nodejs.util.inspect.custom")]=_.toString;_[Symbol.toStringTag]="Decimal";var ar=_.constructor=Oi(ra);Jr=new ar(Jr);Kr=new ar(Kr);var Mi=ar;var cu=20,du=1,ht=1e6,Ri=1e6,fu=-7,pu=21,hu=!1,ir="[big.js] ",mt=ir+"Invalid ",nn=mt+"decimal places",mu=mt+"rounding mode",Li=ir+"Division by zero",q={},Re=void 0,gu=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;function Pi(){function r(e){var t=this;if(!(t instanceof r))return e===Re?Pi():new r(e);if(e instanceof r)t.s=e.s,t.e=e.e,t.c=e.c.slice();else{if(typeof e!="string"){if(r.strict===!0&&typeof e!="bigint")throw TypeError(mt+"value");e=e===0&&1/e<0?"-0":String(e)}bu(t,e)}t.constructor=r}return r.prototype=q,r.DP=cu,r.RM=du,r.NE=fu,r.PE=pu,r.strict=hu,r.roundDown=0,r.roundHalfUp=1,r.roundHalfEven=2,r.roundUp=3,r}function bu(r,e){var t,n,a;if(!gu.test(e))throw Error(mt+"number");for(r.s=e.charAt(0)=="-"?(e=e.slice(1),-1):1,(t=e.indexOf("."))>-1&&(e=e.replace(".","")),(n=e.search(/e/i))>0?(t<0&&(t=n),t+=+e.slice(n+1),e=e.substring(0,n)):t<0&&(t=e.length),a=e.length,n=0;n<a&&e.charAt(n)=="0";)++n;if(n==a)r.c=[r.e=0];else{for(;a>0&&e.charAt(--a)=="0";);for(r.e=t-n-1,r.c=[],t=0;n<=a;)r.c[t++]=+e.charAt(n++)}return r}function gt(r,e,t,n){var a=r.c;if(t===Re&&(t=r.constructor.RM),t!==0&&t!==1&&t!==2&&t!==3)throw Error(mu);if(e<1)n=t===3&&(n||!!a[0])||e===0&&(t===1&&a[0]>=5||t===2&&(a[0]>5||a[0]===5&&(n||a[1]!==Re))),a.length=1,n?(r.e=r.e-e+1,a[0]=1):a[0]=r.e=0;else if(e<a.length){if(n=t===1&&a[e]>=5||t===2&&(a[e]>5||a[e]===5&&(n||a[e+1]!==Re||a[e-1]&1))||t===3&&(n||!!a[0]),a.length=e,n){for(;++a[--e]>9;)if(a[e]=0,e===0){++r.e,a.unshift(1);break}}for(e=a.length;!a[--e];)a.pop()}return r}function bt(r,e,t){var n=r.e,a=r.c.join(""),i=a.length;if(e)a=a.charAt(0)+(i>1?"."+a.slice(1):"")+(n<0?"e":"e+")+n;else if(n<0){for(;++n;)a="0"+a;a="0."+a}else if(n>0)if(++n>i)for(n-=i;n--;)a+="0";else n<i&&(a=a.slice(0,n)+"."+a.slice(n));else i>1&&(a=a.charAt(0)+"."+a.slice(1));return r.s<0&&t?"-"+a:a}q.abs=function(){var r=new this.constructor(this);return r.s=1,r};q.cmp=function(r){var e,t=this,n=t.c,a=(r=new t.constructor(r)).c,i=t.s,s=r.s,o=t.e,l=r.e;if(!n[0]||!a[0])return n[0]?i:a[0]?-s:0;if(i!=s)return i;if(e=i<0,o!=l)return o>l^e?1:-1;for(s=(o=n.length)<(l=a.length)?o:l,i=-1;++i<s;)if(n[i]!=a[i])return n[i]>a[i]^e?1:-1;return o==l?0:o>l^e?1:-1};q.div=function(r){var e=this,t=e.constructor,n=e.c,a=(r=new t(r)).c,i=e.s==r.s?1:-1,s=t.DP;if(s!==~~s||s<0||s>ht)throw Error(nn);if(!a[0])throw Error(Li);if(!n[0])return r.s=i,r.c=[r.e=0],r;var o,l,u,c,d,f=a.slice(),p=o=a.length,h=n.length,m=n.slice(0,o),g=m.length,b=r,y=b.c=[],v=0,w=s+(b.e=e.e-r.e)+1;for(b.s=i,i=w<0?0:w,f.unshift(0);g++<o;)m.push(0);do{for(u=0;u<10;u++){if(o!=(g=m.length))c=o>g?1:-1;else for(d=-1,c=0;++d<o;)if(a[d]!=m[d]){c=a[d]>m[d]?1:-1;break}if(c<0){for(l=g==o?a:f;g;){if(m[--g]<l[g]){for(d=g;d&&!m[--d];)m[d]=9;--m[d],m[g]+=10}m[g]-=l[g]}for(;!m[0];)m.shift()}else break}y[v++]=c?u:++u,m[0]&&c?m[g]=n[p]||0:m=[n[p]]}while((p++<h||m[0]!==Re)&&i--);return!y[0]&&v!=1&&(y.shift(),b.e--,w--),v>w&>(b,w,t.RM,m[0]!==Re),b};q.eq=function(r){return this.cmp(r)===0};q.gt=function(r){return this.cmp(r)>0};q.gte=function(r){return this.cmp(r)>-1};q.lt=function(r){return this.cmp(r)<0};q.lte=function(r){return this.cmp(r)<1};q.minus=q.sub=function(r){var e,t,n,a,i=this,s=i.constructor,o=i.s,l=(r=new s(r)).s;if(o!=l)return r.s=-l,i.plus(r);var u=i.c.slice(),c=i.e,d=r.c,f=r.e;if(!u[0]||!d[0])return d[0]?r.s=-l:u[0]?r=new s(i):r.s=1,r;if(o=c-f){for((a=o<0)?(o=-o,n=u):(f=c,n=d),n.reverse(),l=o;l--;)n.push(0);n.reverse()}else for(t=((a=u.length<d.length)?u:d).length,o=l=0;l<t;l++)if(u[l]!=d[l]){a=u[l]<d[l];break}if(a&&(n=u,u=d,d=n,r.s=-r.s),(l=(t=d.length)-(e=u.length))>0)for(;l--;)u[e++]=0;for(l=e;t>o;){if(u[--t]<d[t]){for(e=t;e&&!u[--e];)u[e]=9;--u[e],u[t]+=10}u[t]-=d[t]}for(;u[--l]===0;)u.pop();for(;u[0]===0;)u.shift(),--f;return u[0]||(r.s=1,u=[f=0]),r.c=u,r.e=f,r};q.mod=function(r){var e,t=this,n=t.constructor,a=t.s,i=(r=new n(r)).s;if(!r.c[0])throw Error(Li);return t.s=r.s=1,e=r.cmp(t)==1,t.s=a,r.s=i,e?new n(t):(a=n.DP,i=n.RM,n.DP=n.RM=0,t=t.div(r),n.DP=a,n.RM=i,this.minus(t.times(r)))};q.neg=function(){var r=new this.constructor(this);return r.s=-r.s,r};q.plus=q.add=function(r){var e,t,n,a=this,i=a.constructor;if(r=new i(r),a.s!=r.s)return r.s=-r.s,a.minus(r);var s=a.e,o=a.c,l=r.e,u=r.c;if(!o[0]||!u[0])return u[0]||(o[0]?r=new i(a):r.s=a.s),r;if(o=o.slice(),e=s-l){for(e>0?(l=s,n=u):(e=-e,n=o),n.reverse();e--;)n.push(0);n.reverse()}for(o.length-u.length<0&&(n=u,u=o,o=n),e=u.length,t=0;e;o[e]%=10)t=(o[--e]=o[e]+u[e]+t)/10|0;for(t&&(o.unshift(t),++l),e=o.length;o[--e]===0;)o.pop();return r.c=o,r.e=l,r};q.pow=function(r){var e=this,t=new e.constructor("1"),n=t,a=r<0;if(r!==~~r||r<-Ri||r>Ri)throw Error(mt+"exponent");for(a&&(r=-r);r&1&&(n=n.times(e)),r>>=1,!!r;)e=e.times(e);return a?t.div(n):n};q.prec=function(r,e){if(r!==~~r||r<1||r>ht)throw Error(mt+"precision");return gt(new this.constructor(this),r,e)};q.round=function(r,e){if(r===Re)r=0;else if(r!==~~r||r<-ht||r>ht)throw Error(nn);return gt(new this.constructor(this),r+this.e+1,e)};q.sqrt=function(){var r,e,t,n=this,a=n.constructor,i=n.s,s=n.e,o=new a("0.5");if(!n.c[0])return new a(n);if(i<0)throw Error(ir+"No square root");i=Math.sqrt(+bt(n,!0,!0)),i===0||i===1/0?(e=n.c.join(""),e.length+s&1||(e+="0"),i=Math.sqrt(e),s=((s+1)/2|0)-(s<0||s&1),r=new a((i==1/0?"5e":(i=i.toExponential()).slice(0,i.indexOf("e")+1))+s)):r=new a(i+""),s=r.e+(a.DP+=4);do t=r,r=o.times(t.plus(n.div(t)));while(t.c.slice(0,s).join("")!==r.c.slice(0,s).join(""));return gt(r,(a.DP-=4)+r.e+1,a.RM)};q.times=q.mul=function(r){var e,t=this,n=t.constructor,a=t.c,i=(r=new n(r)).c,s=a.length,o=i.length,l=t.e,u=r.e;if(r.s=t.s==r.s?1:-1,!a[0]||!i[0])return r.c=[r.e=0],r;for(r.e=l+u,s<o&&(e=a,a=i,i=e,u=s,s=o,o=u),e=new Array(u=s+o);u--;)e[u]=0;for(l=o;l--;){for(o=0,u=s+l;u>l;)o=e[u]+i[l]*a[u-l-1]+o,e[u--]=o%10,o=o/10|0;e[u]=o}for(o?++r.e:e.shift(),l=e.length;!e[--l];)e.pop();return r.c=e,r};q.toExponential=function(r,e){var t=this,n=t.c[0];if(r!==Re){if(r!==~~r||r<0||r>ht)throw Error(nn);for(t=gt(new t.constructor(t),++r,e);t.c.length<r;)t.c.push(0)}return bt(t,!0,!!n)};q.toFixed=function(r,e){var t=this,n=t.c[0];if(r!==Re){if(r!==~~r||r<0||r>ht)throw Error(nn);for(t=gt(new t.constructor(t),r+t.e+1,e),r=r+t.e+1;t.c.length<r;)t.c.push(0)}return bt(t,!1,!!n)};q[Symbol.for("nodejs.util.inspect.custom")]=q.toJSON=q.toString=function(){var r=this,e=r.constructor;return bt(r,r.e<=e.NE||r.e>=e.PE,!!r.c[0])};q.toNumber=function(){var r=+bt(this,!0,!0);if(this.constructor.strict===!0&&!this.eq(r.toString()))throw Error(ir+"Imprecise conversion");return r};q.toPrecision=function(r,e){var t=this,n=t.constructor,a=t.c[0];if(r!==Re){if(r!==~~r||r<1||r>ht)throw Error(mt+"precision");for(t=gt(new n(t),r,e);t.c.length<r;)t.c.push(0)}return bt(t,r<=t.e||t.e<=n.NE||t.e>=n.PE,!!a)};q.valueOf=function(){var r=this,e=r.constructor;if(e.strict===!0)throw Error(ir+"valueOf disallowed");return bt(r,r.e<=e.NE||r.e>=e.PE,!0)};var _u=Pi(),$i=_u;var ga={};hi(ga,{DecodeError:()=>pe,Decoder:()=>Se,EXT_TIMESTAMP:()=>oa,Encoder:()=>Bt,ExtData:()=>Ne,ExtensionCodec:()=>at,decode:()=>Gi,decodeArrayStream:()=>Zi,decodeAsync:()=>Yi,decodeMulti:()=>Xi,decodeMultiStream:()=>Ji,decodeTimestampExtension:()=>fa,decodeTimestampToTimeSpec:()=>da,encode:()=>on,encodeDateToTimeSpec:()=>ua,encodeTimeSpecToTimestamp:()=>la,encodeTimestampExtension:()=>ca});function Fi(r){let e=r.length,t=0,n=0;for(;n<e;){let a=r.charCodeAt(n++);if((a&4294967168)===0){t++;continue}else if((a&4294965248)===0)t+=2;else{if(a>=55296&&a<=56319&&n<e){let i=r.charCodeAt(n);(i&64512)===56320&&(++n,a=((a&1023)<<10)+(i&1023)+65536)}(a&4294901760)===0?t+=3:t+=4}}return t}function wu(r,e,t){let n=r.length,a=t,i=0;for(;i<n;){let s=r.charCodeAt(i++);if((s&4294967168)===0){e[a++]=s;continue}else if((s&4294965248)===0)e[a++]=s>>6&31|192;else{if(s>=55296&&s<=56319&&i<n){let o=r.charCodeAt(i);(o&64512)===56320&&(++i,s=((s&1023)<<10)+(o&1023)+65536)}(s&4294901760)===0?(e[a++]=s>>12&15|224,e[a++]=s>>6&63|128):(e[a++]=s>>18&7|240,e[a++]=s>>12&63|128,e[a++]=s>>6&63|128)}e[a++]=s&63|128}}var yu=new TextEncoder,vu=50;function xu(r,e,t){yu.encodeInto(r,e.subarray(t))}function Ui(r,e,t){r.length>vu?xu(r,e,t):wu(r,e,t)}var Eu=4096;function sa(r,e,t){let n=e,a=n+t,i=[],s="";for(;n<a;){let o=r[n++];if((o&128)===0)i.push(o);else if((o&224)===192){let l=r[n++]&63;i.push((o&31)<<6|l)}else if((o&240)===224){let l=r[n++]&63,u=r[n++]&63;i.push((o&31)<<12|l<<6|u)}else if((o&248)===240){let l=r[n++]&63,u=r[n++]&63,c=r[n++]&63,d=(o&7)<<18|l<<12|u<<6|c;d>65535&&(d-=65536,i.push(d>>>10&1023|55296),d=56320|d&1023),i.push(d)}else i.push(o);i.length>=Eu&&(s+=String.fromCharCode(...i),i.length=0)}return i.length>0&&(s+=String.fromCharCode(...i)),s}var ku=new TextDecoder,Au=200;function Du(r,e,t){let n=r.subarray(e,e+t);return ku.decode(n)}function qi(r,e,t){return t>Au?Du(r,e,t):sa(r,e,t)}var Ne=class{type;data;constructor(e,t){this.type=e,this.data=t}};var pe=class r extends Error{constructor(e){super(e);let t=Object.create(r.prototype);Object.setPrototypeOf(this,t),Object.defineProperty(this,"name",{configurable:!0,enumerable:!1,value:r.name})}};function ji(r,e,t){let n=t/4294967296,a=t;r.setUint32(e,n),r.setUint32(e+4,a)}function an(r,e,t){let n=Math.floor(t/4294967296),a=t;r.setUint32(e,n),r.setUint32(e+4,a)}function sn(r,e){let t=r.getInt32(e),n=r.getUint32(e+4);return t*4294967296+n}function zi(r,e){let t=r.getUint32(e),n=r.getUint32(e+4);return t*4294967296+n}var oa=-1,Tu=4294967296-1,Cu=17179869184-1;function la({sec:r,nsec:e}){if(r>=0&&e>=0&&r<=Cu)if(e===0&&r<=Tu){let t=new Uint8Array(4);return new DataView(t.buffer).setUint32(0,r),t}else{let t=r/4294967296,n=r&4294967295,a=new Uint8Array(8),i=new DataView(a.buffer);return i.setUint32(0,e<<2|t&3),i.setUint32(4,n),a}else{let t=new Uint8Array(12),n=new DataView(t.buffer);return n.setUint32(0,e),an(n,4,r),t}}function ua(r){let e=r.getTime(),t=Math.floor(e/1e3),n=(e-t*1e3)*1e6,a=Math.floor(n/1e9);return{sec:t+a,nsec:n-a*1e9}}function ca(r){if(r instanceof Date){let e=ua(r);return la(e)}else return null}function da(r){let e=new DataView(r.buffer,r.byteOffset,r.byteLength);switch(r.byteLength){case 4:return{sec:e.getUint32(0),nsec:0};case 8:{let t=e.getUint32(0),n=e.getUint32(4),a=(t&3)*4294967296+n,i=t>>>2;return{sec:a,nsec:i}}case 12:{let t=sn(e,4),n=e.getUint32(0);return{sec:t,nsec:n}}default:throw new pe(`Unrecognized data size for timestamp (expected 4, 8, or 12): ${r.length}`)}}function fa(r){let e=da(r);return new Date(e.sec*1e3+e.nsec/1e6)}var Vi={type:oa,encode:ca,decode:fa};var at=class r{static defaultCodec=new r;__brand;builtInEncoders=[];builtInDecoders=[];encoders=[];decoders=[];constructor(){this.register(Vi)}register({type:e,encode:t,decode:n}){if(e>=0)this.encoders[e]=t,this.decoders[e]=n;else{let a=-1-e;this.builtInEncoders[a]=t,this.builtInDecoders[a]=n}}tryToEncode(e,t){for(let n=0;n<this.builtInEncoders.length;n++){let a=this.builtInEncoders[n];if(a!=null){let i=a(e,t);if(i!=null){let s=-1-n;return new Ne(s,i)}}}for(let n=0;n<this.encoders.length;n++){let a=this.encoders[n];if(a!=null){let i=a(e,t);if(i!=null){let s=n;return new Ne(s,i)}}}return e instanceof Ne?e:null}decode(e,t,n){let a=t<0?this.builtInDecoders[-1-t]:this.decoders[t];return a?a(e,t,n):new Ne(t,e)}};function Nu(r){return r instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&r instanceof SharedArrayBuffer}function sr(r){return r instanceof Uint8Array?r:ArrayBuffer.isView(r)?new Uint8Array(r.buffer,r.byteOffset,r.byteLength):Nu(r)?new Uint8Array(r):Uint8Array.from(r)}var Su=100,Iu=2048,Bt=class r{extensionCodec;context;useBigInt64;maxDepth;initialBufferSize;sortKeys;forceFloat32;ignoreUndefined;forceIntegerToFloat;pos;view;bytes;entered=!1;constructor(e){this.extensionCodec=e?.extensionCodec??at.defaultCodec,this.context=e?.context,this.useBigInt64=e?.useBigInt64??!1,this.maxDepth=e?.maxDepth??Su,this.initialBufferSize=e?.initialBufferSize??Iu,this.sortKeys=e?.sortKeys??!1,this.forceFloat32=e?.forceFloat32??!1,this.ignoreUndefined=e?.ignoreUndefined??!1,this.forceIntegerToFloat=e?.forceIntegerToFloat??!1,this.pos=0,this.view=new DataView(new ArrayBuffer(this.initialBufferSize)),this.bytes=new Uint8Array(this.view.buffer)}clone(){return new r({extensionCodec:this.extensionCodec,context:this.context,useBigInt64:this.useBigInt64,maxDepth:this.maxDepth,initialBufferSize:this.initialBufferSize,sortKeys:this.sortKeys,forceFloat32:this.forceFloat32,ignoreUndefined:this.ignoreUndefined,forceIntegerToFloat:this.forceIntegerToFloat})}reinitializeState(){this.pos=0}encodeSharedRef(e){if(this.entered)return this.clone().encodeSharedRef(e);try{return this.entered=!0,this.reinitializeState(),this.doEncode(e,1),this.bytes.subarray(0,this.pos)}finally{this.entered=!1}}encode(e){if(this.entered)return this.clone().encode(e);try{return this.entered=!0,this.reinitializeState(),this.doEncode(e,1),this.bytes.slice(0,this.pos)}finally{this.entered=!1}}doEncode(e,t){if(t>this.maxDepth)throw new Error(`Too deep objects in depth ${t}`);e==null?this.encodeNil():typeof e=="boolean"?this.encodeBoolean(e):typeof e=="number"?this.forceIntegerToFloat?this.encodeNumberAsFloat(e):this.encodeNumber(e):typeof e=="string"?this.encodeString(e):this.useBigInt64&&typeof e=="bigint"?this.encodeBigInt64(e):this.encodeObject(e,t)}ensureBufferSizeToWrite(e){let t=this.pos+e;this.view.byteLength<t&&this.resizeBuffer(t*2)}resizeBuffer(e){let t=new ArrayBuffer(e),n=new Uint8Array(t),a=new DataView(t);n.set(this.bytes),this.view=a,this.bytes=n}encodeNil(){this.writeU8(192)}encodeBoolean(e){e===!1?this.writeU8(194):this.writeU8(195)}encodeNumber(e){!this.forceIntegerToFloat&&Number.isSafeInteger(e)?e>=0?e<128?this.writeU8(e):e<256?(this.writeU8(204),this.writeU8(e)):e<65536?(this.writeU8(205),this.writeU16(e)):e<4294967296?(this.writeU8(206),this.writeU32(e)):this.useBigInt64?this.encodeNumberAsFloat(e):(this.writeU8(207),this.writeU64(e)):e>=-32?this.writeU8(224|e+32):e>=-128?(this.writeU8(208),this.writeI8(e)):e>=-32768?(this.writeU8(209),this.writeI16(e)):e>=-2147483648?(this.writeU8(210),this.writeI32(e)):this.useBigInt64?this.encodeNumberAsFloat(e):(this.writeU8(211),this.writeI64(e)):this.encodeNumberAsFloat(e)}encodeNumberAsFloat(e){this.forceFloat32?(this.writeU8(202),this.writeF32(e)):(this.writeU8(203),this.writeF64(e))}encodeBigInt64(e){e>=BigInt(0)?(this.writeU8(207),this.writeBigUint64(e)):(this.writeU8(211),this.writeBigInt64(e))}writeStringHeader(e){if(e<32)this.writeU8(160+e);else if(e<256)this.writeU8(217),this.writeU8(e);else if(e<65536)this.writeU8(218),this.writeU16(e);else if(e<4294967296)this.writeU8(219),this.writeU32(e);else throw new Error(`Too long string: ${e} bytes in UTF-8`)}encodeString(e){let n=Fi(e);this.ensureBufferSizeToWrite(5+n),this.writeStringHeader(n),Ui(e,this.bytes,this.pos),this.pos+=n}encodeObject(e,t){let n=this.extensionCodec.tryToEncode(e,this.context);if(n!=null)this.encodeExtension(n);else if(Array.isArray(e))this.encodeArray(e,t);else if(ArrayBuffer.isView(e))this.encodeBinary(e);else if(typeof e=="object")this.encodeMap(e,t);else throw new Error(`Unrecognized object: ${Object.prototype.toString.apply(e)}`)}encodeBinary(e){let t=e.byteLength;if(t<256)this.writeU8(196),this.writeU8(t);else if(t<65536)this.writeU8(197),this.writeU16(t);else if(t<4294967296)this.writeU8(198),this.writeU32(t);else throw new Error(`Too large binary: ${t}`);let n=sr(e);this.writeU8a(n)}encodeArray(e,t){let n=e.length;if(n<16)this.writeU8(144+n);else if(n<65536)this.writeU8(220),this.writeU16(n);else if(n<4294967296)this.writeU8(221),this.writeU32(n);else throw new Error(`Too large array: ${n}`);for(let a of e)this.doEncode(a,t+1)}countWithoutUndefined(e,t){let n=0;for(let a of t)e[a]!==void 0&&n++;return n}encodeMap(e,t){let n=Object.keys(e);this.sortKeys&&n.sort();let a=this.ignoreUndefined?this.countWithoutUndefined(e,n):n.length;if(a<16)this.writeU8(128+a);else if(a<65536)this.writeU8(222),this.writeU16(a);else if(a<4294967296)this.writeU8(223),this.writeU32(a);else throw new Error(`Too large map object: ${a}`);for(let i of n){let s=e[i];this.ignoreUndefined&&s===void 0||(this.encodeString(i),this.doEncode(s,t+1))}}encodeExtension(e){if(typeof e.data=="function"){let n=e.data(this.pos+6),a=n.length;if(a>=4294967296)throw new Error(`Too large extension object: ${a}`);this.writeU8(201),this.writeU32(a),this.writeI8(e.type),this.writeU8a(n);return}let t=e.data.length;if(t===1)this.writeU8(212);else if(t===2)this.writeU8(213);else if(t===4)this.writeU8(214);else if(t===8)this.writeU8(215);else if(t===16)this.writeU8(216);else if(t<256)this.writeU8(199),this.writeU8(t);else if(t<65536)this.writeU8(200),this.writeU16(t);else if(t<4294967296)this.writeU8(201),this.writeU32(t);else throw new Error(`Too large extension object: ${t}`);this.writeI8(e.type),this.writeU8a(e.data)}writeU8(e){this.ensureBufferSizeToWrite(1),this.view.setUint8(this.pos,e),this.pos++}writeU8a(e){let t=e.length;this.ensureBufferSizeToWrite(t),this.bytes.set(e,this.pos),this.pos+=t}writeI8(e){this.ensureBufferSizeToWrite(1),this.view.setInt8(this.pos,e),this.pos++}writeU16(e){this.ensureBufferSizeToWrite(2),this.view.setUint16(this.pos,e),this.pos+=2}writeI16(e){this.ensureBufferSizeToWrite(2),this.view.setInt16(this.pos,e),this.pos+=2}writeU32(e){this.ensureBufferSizeToWrite(4),this.view.setUint32(this.pos,e),this.pos+=4}writeI32(e){this.ensureBufferSizeToWrite(4),this.view.setInt32(this.pos,e),this.pos+=4}writeF32(e){this.ensureBufferSizeToWrite(4),this.view.setFloat32(this.pos,e),this.pos+=4}writeF64(e){this.ensureBufferSizeToWrite(8),this.view.setFloat64(this.pos,e),this.pos+=8}writeU64(e){this.ensureBufferSizeToWrite(8),ji(this.view,this.pos,e),this.pos+=8}writeI64(e){this.ensureBufferSizeToWrite(8),an(this.view,this.pos,e),this.pos+=8}writeBigUint64(e){this.ensureBufferSizeToWrite(8),this.view.setBigUint64(this.pos,e),this.pos+=8}writeBigInt64(e){this.ensureBufferSizeToWrite(8),this.view.setBigInt64(this.pos,e),this.pos+=8}};function on(r,e){return new Bt(e).encodeSharedRef(r)}function ln(r){return`${r<0?"-":""}0x${Math.abs(r).toString(16).padStart(2,"0")}`}var Bu=16,Ou=16,un=class{hit=0;miss=0;caches;maxKeyLength;maxLengthPerKey;constructor(e=Bu,t=Ou){this.maxKeyLength=e,this.maxLengthPerKey=t,this.caches=[];for(let n=0;n<this.maxKeyLength;n++)this.caches.push([])}canBeCached(e){return e>0&&e<=this.maxKeyLength}find(e,t,n){let a=this.caches[n-1];e:for(let i of a){let s=i.bytes;for(let o=0;o<n;o++)if(s[o]!==e[t+o])continue e;return i.str}return null}store(e,t){let n=this.caches[e.length-1],a={bytes:e,str:t};n.length>=this.maxLengthPerKey?n[Math.random()*n.length|0]=a:n.push(a)}decode(e,t,n){let a=this.find(e,t,n);if(a!=null)return this.hit++,a;this.miss++;let i=sa(e,t,n),s=Uint8Array.prototype.slice.call(e,t,t+n);return this.store(s,i),i}};var pa="array",ur="map_key",Wi="map_value",Mu=r=>{if(typeof r=="string"||typeof r=="number")return r;throw new pe("The type of key must be string or number but "+typeof r)},ha=class{stack=[];stackHeadPosition=-1;get length(){return this.stackHeadPosition+1}top(){return this.stack[this.stackHeadPosition]}pushArrayState(e){let t=this.getUninitializedStateFromPool();t.type=pa,t.position=0,t.size=e,t.array=new Array(e)}pushMapState(e){let t=this.getUninitializedStateFromPool();t.type=ur,t.readCount=0,t.size=e,t.map={}}getUninitializedStateFromPool(){if(this.stackHeadPosition++,this.stackHeadPosition===this.stack.length){let e={type:void 0,size:0,array:void 0,position:0,readCount:0,map:void 0,key:null};this.stack.push(e)}return this.stack[this.stackHeadPosition]}release(e){if(this.stack[this.stackHeadPosition]!==e)throw new Error("Invalid stack state. Released state is not on top of the stack.");if(e.type===pa){let n=e;n.size=0,n.array=void 0,n.position=0,n.type=void 0}if(e.type===ur||e.type===Wi){let n=e;n.size=0,n.map=void 0,n.readCount=0,n.type=void 0}this.stackHeadPosition--}reset(){this.stack.length=0,this.stackHeadPosition=-1}},lr=-1,ma=new DataView(new ArrayBuffer(0)),Ru=new Uint8Array(ma.buffer);try{ma.getInt8(0)}catch(r){if(!(r instanceof RangeError))throw new Error("This module is not supported in the current JavaScript engine because DataView does not throw RangeError on out-of-bounds access")}var Hi=new RangeError("Insufficient data"),Lu=new un,Se=class r{extensionCodec;context;useBigInt64;rawStrings;maxStrLength;maxBinLength;maxArrayLength;maxMapLength;maxExtLength;keyDecoder;mapKeyConverter;totalPos=0;pos=0;view=ma;bytes=Ru;headByte=lr;stack=new ha;entered=!1;constructor(e){this.extensionCodec=e?.extensionCodec??at.defaultCodec,this.context=e?.context,this.useBigInt64=e?.useBigInt64??!1,this.rawStrings=e?.rawStrings??!1,this.maxStrLength=e?.maxStrLength??4294967295,this.maxBinLength=e?.maxBinLength??4294967295,this.maxArrayLength=e?.maxArrayLength??4294967295,this.maxMapLength=e?.maxMapLength??4294967295,this.maxExtLength=e?.maxExtLength??4294967295,this.keyDecoder=e?.keyDecoder!==void 0?e.keyDecoder:Lu,this.mapKeyConverter=e?.mapKeyConverter??Mu}clone(){return new r({extensionCodec:this.extensionCodec,context:this.context,useBigInt64:this.useBigInt64,rawStrings:this.rawStrings,maxStrLength:this.maxStrLength,maxBinLength:this.maxBinLength,maxArrayLength:this.maxArrayLength,maxMapLength:this.maxMapLength,maxExtLength:this.maxExtLength,keyDecoder:this.keyDecoder})}reinitializeState(){this.totalPos=0,this.headByte=lr,this.stack.reset()}setBuffer(e){let t=sr(e);this.bytes=t,this.view=new DataView(t.buffer,t.byteOffset,t.byteLength),this.pos=0}appendBuffer(e){if(this.headByte===lr&&!this.hasRemaining(1))this.setBuffer(e);else{let t=this.bytes.subarray(this.pos),n=sr(e),a=new Uint8Array(t.length+n.length);a.set(t),a.set(n,t.length),this.setBuffer(a)}}hasRemaining(e){return this.view.byteLength-this.pos>=e}createExtraByteError(e){let{view:t,pos:n}=this;return new RangeError(`Extra ${t.byteLength-n} of ${t.byteLength} byte(s) found at buffer[${e}]`)}decode(e){if(this.entered)return this.clone().decode(e);try{this.entered=!0,this.reinitializeState(),this.setBuffer(e);let t=this.doDecodeSync();if(this.hasRemaining(1))throw this.createExtraByteError(this.pos);return t}finally{this.entered=!1}}*decodeMulti(e){if(this.entered){yield*this.clone().decodeMulti(e);return}try{for(this.entered=!0,this.reinitializeState(),this.setBuffer(e);this.hasRemaining(1);)yield this.doDecodeSync()}finally{this.entered=!1}}async decodeAsync(e){if(this.entered)return this.clone().decodeAsync(e);try{this.entered=!0;let t=!1,n;for await(let o of e){if(t)throw this.entered=!1,this.createExtraByteError(this.totalPos);this.appendBuffer(o);try{n=this.doDecodeSync(),t=!0}catch(l){if(!(l instanceof RangeError))throw l}this.totalPos+=this.pos}if(t){if(this.hasRemaining(1))throw this.createExtraByteError(this.totalPos);return n}let{headByte:a,pos:i,totalPos:s}=this;throw new RangeError(`Insufficient data in parsing ${ln(a)} at ${s} (${i} in the current buffer)`)}finally{this.entered=!1}}decodeArrayStream(e){return this.decodeMultiAsync(e,!0)}decodeStream(e){return this.decodeMultiAsync(e,!1)}async*decodeMultiAsync(e,t){if(this.entered){yield*this.clone().decodeMultiAsync(e,t);return}try{this.entered=!0;let n=t,a=-1;for await(let i of e){if(t&&a===0)throw this.createExtraByteError(this.totalPos);this.appendBuffer(i),n&&(a=this.readArraySize(),n=!1,this.complete());try{for(;yield this.doDecodeSync(),--a!==0;);}catch(s){if(!(s instanceof RangeError))throw s}this.totalPos+=this.pos}}finally{this.entered=!1}}doDecodeSync(){e:for(;;){let e=this.readHeadByte(),t;if(e>=224)t=e-256;else if(e<192)if(e<128)t=e;else if(e<144){let a=e-128;if(a!==0){this.pushMapState(a),this.complete();continue e}else t={}}else if(e<160){let a=e-144;if(a!==0){this.pushArrayState(a),this.complete();continue e}else t=[]}else{let a=e-160;t=this.decodeString(a,0)}else if(e===192)t=null;else if(e===194)t=!1;else if(e===195)t=!0;else if(e===202)t=this.readF32();else if(e===203)t=this.readF64();else if(e===204)t=this.readU8();else if(e===205)t=this.readU16();else if(e===206)t=this.readU32();else if(e===207)this.useBigInt64?t=this.readU64AsBigInt():t=this.readU64();else if(e===208)t=this.readI8();else if(e===209)t=this.readI16();else if(e===210)t=this.readI32();else if(e===211)this.useBigInt64?t=this.readI64AsBigInt():t=this.readI64();else if(e===217){let a=this.lookU8();t=this.decodeString(a,1)}else if(e===218){let a=this.lookU16();t=this.decodeString(a,2)}else if(e===219){let a=this.lookU32();t=this.decodeString(a,4)}else if(e===220){let a=this.readU16();if(a!==0){this.pushArrayState(a),this.complete();continue e}else t=[]}else if(e===221){let a=this.readU32();if(a!==0){this.pushArrayState(a),this.complete();continue e}else t=[]}else if(e===222){let a=this.readU16();if(a!==0){this.pushMapState(a),this.complete();continue e}else t={}}else if(e===223){let a=this.readU32();if(a!==0){this.pushMapState(a),this.complete();continue e}else t={}}else if(e===196){let a=this.lookU8();t=this.decodeBinary(a,1)}else if(e===197){let a=this.lookU16();t=this.decodeBinary(a,2)}else if(e===198){let a=this.lookU32();t=this.decodeBinary(a,4)}else if(e===212)t=this.decodeExtension(1,0);else if(e===213)t=this.decodeExtension(2,0);else if(e===214)t=this.decodeExtension(4,0);else if(e===215)t=this.decodeExtension(8,0);else if(e===216)t=this.decodeExtension(16,0);else if(e===199){let a=this.lookU8();t=this.decodeExtension(a,1)}else if(e===200){let a=this.lookU16();t=this.decodeExtension(a,2)}else if(e===201){let a=this.lookU32();t=this.decodeExtension(a,4)}else throw new pe(`Unrecognized type byte: ${ln(e)}`);this.complete();let n=this.stack;for(;n.length>0;){let a=n.top();if(a.type===pa)if(a.array[a.position]=t,a.position++,a.position===a.size)t=a.array,n.release(a);else continue e;else if(a.type===ur){if(t==="__proto__")throw new pe("The key __proto__ is not allowed");a.key=this.mapKeyConverter(t),a.type=Wi;continue e}else if(a.map[a.key]=t,a.readCount++,a.readCount===a.size)t=a.map,n.release(a);else{a.key=null,a.type=ur;continue e}}return t}}readHeadByte(){return this.headByte===lr&&(this.headByte=this.readU8()),this.headByte}complete(){this.headByte=lr}readArraySize(){let e=this.readHeadByte();switch(e){case 220:return this.readU16();case 221:return this.readU32();default:{if(e<160)return e-144;throw new pe(`Unrecognized array type byte: ${ln(e)}`)}}}pushMapState(e){if(e>this.maxMapLength)throw new pe(`Max length exceeded: map length (${e}) > maxMapLengthLength (${this.maxMapLength})`);this.stack.pushMapState(e)}pushArrayState(e){if(e>this.maxArrayLength)throw new pe(`Max length exceeded: array length (${e}) > maxArrayLength (${this.maxArrayLength})`);this.stack.pushArrayState(e)}decodeString(e,t){return!this.rawStrings||this.stateIsMapKey()?this.decodeUtf8String(e,t):this.decodeBinary(e,t)}decodeUtf8String(e,t){if(e>this.maxStrLength)throw new pe(`Max length exceeded: UTF-8 byte length (${e}) > maxStrLength (${this.maxStrLength})`);if(this.bytes.byteLength<this.pos+t+e)throw Hi;let n=this.pos+t,a;return this.stateIsMapKey()&&this.keyDecoder?.canBeCached(e)?a=this.keyDecoder.decode(this.bytes,n,e):a=qi(this.bytes,n,e),this.pos+=t+e,a}stateIsMapKey(){return this.stack.length>0?this.stack.top().type===ur:!1}decodeBinary(e,t){if(e>this.maxBinLength)throw new pe(`Max length exceeded: bin length (${e}) > maxBinLength (${this.maxBinLength})`);if(!this.hasRemaining(e+t))throw Hi;let n=this.pos+t,a=this.bytes.subarray(n,n+e);return this.pos+=t+e,a}decodeExtension(e,t){if(e>this.maxExtLength)throw new pe(`Max length exceeded: ext length (${e}) > maxExtLength (${this.maxExtLength})`);let n=this.view.getInt8(this.pos+t),a=this.decodeBinary(e,t+1);return this.extensionCodec.decode(a,n,this.context)}lookU8(){return this.view.getUint8(this.pos)}lookU16(){return this.view.getUint16(this.pos)}lookU32(){return this.view.getUint32(this.pos)}readU8(){let e=this.view.getUint8(this.pos);return this.pos++,e}readI8(){let e=this.view.getInt8(this.pos);return this.pos++,e}readU16(){let e=this.view.getUint16(this.pos);return this.pos+=2,e}readI16(){let e=this.view.getInt16(this.pos);return this.pos+=2,e}readU32(){let e=this.view.getUint32(this.pos);return this.pos+=4,e}readI32(){let e=this.view.getInt32(this.pos);return this.pos+=4,e}readU64(){let e=zi(this.view,this.pos);return this.pos+=8,e}readI64(){let e=sn(this.view,this.pos);return this.pos+=8,e}readU64AsBigInt(){let e=this.view.getBigUint64(this.pos);return this.pos+=8,e}readI64AsBigInt(){let e=this.view.getBigInt64(this.pos);return this.pos+=8,e}readF32(){let e=this.view.getFloat32(this.pos);return this.pos+=4,e}readF64(){let e=this.view.getFloat64(this.pos);return this.pos+=8,e}};function Gi(r,e){return new Se(e).decode(r)}function Xi(r,e){return new Se(e).decodeMulti(r)}function Pu(r){return r[Symbol.asyncIterator]!=null}async function*$u(r){let e=r.getReader();try{for(;;){let{done:t,value:n}=await e.read();if(t)return;yield n}}finally{e.releaseLock()}}function cn(r){return Pu(r)?r:$u(r)}async function Yi(r,e){let t=cn(r);return new Se(e).decodeAsync(t)}function Zi(r,e){let t=cn(r);return new Se(e).decodeArrayStream(t)}function Ji(r,e){let t=cn(r);return new Se(e).decodeStream(t)}var Nn=mi($a(),1),Fa=Mi,Ua=$i,Fe=ga,ro=Nn.DOMParser,no=Nn.XMLSerializer;var ao=Fe!==null;function io(){if(!ao)throw new Error("@msgpack/msgpack is required for MessagePack support. Install with: npm install @msgpack/msgpack")}var so=Pd();function Pd(){if(!ao)return null;let r=new TextEncoder,e=new TextDecoder,t=new Fe.ExtensionCodec;return t.register({type:-1,encode:n=>{if(n instanceof Date){let a=xt(n);if(a==="D"||a==="H")return null}return Fe.encodeTimestampExtension(n)},decode:n=>Fe.decodeTimestampExtension(n)}),t.register({type:1,encode:n=>Te(n)?r.encode(n.toString()):null,decode:n=>Sn(e.decode(n))}),t.register({type:2,encode:n=>{if(n instanceof Date&&xt(n)==="D"){let a=n.getUTCFullYear(),i=String(n.getUTCMonth()+1).padStart(2,"0"),s=String(n.getUTCDate()).padStart(2,"0");return r.encode(`${a}-${i}-${s}`)}return null},decode:n=>new Date(e.decode(n)+"T00:00:00.000Z")}),t.register({type:3,encode:n=>{if(n instanceof Date&&xt(n)==="H"){let a=String(n.getUTCHours()).padStart(2,"0"),i=String(n.getUTCMinutes()).padStart(2,"0"),s=String(n.getUTCSeconds()).padStart(2,"0"),o=String(n.getUTCMilliseconds()).padStart(3,"0");return r.encode(`${a}:${i}:${s}.${o}`)}return null},decode:n=>{let a=e.decode(n),i=a.indexOf("."),s=i>=0?a.substring(0,i):a,o=i>=0?a.substring(i+1):"0",[l,u,c]=s.split(":"),d=Math.round(+o.substring(0,3));return new Date(Date.UTC(1970,0,1,+l,+u,+c,d))}}),t.register({type:4,encode:n=>{let a=qa(n);if(a!==null){let[i,s]=a;return r.encode(`${i}:${s(n)}`)}return null},decode:n=>{let a=e.decode(n),i=a.indexOf(":"),s=a.slice(0,i),o=a.slice(i+1),l=dt[s];if(l!==void 0){let[,u]=l;return u(o)}return`${o}::${s}`}}),t}function oo(r){return io(),Fe.encode(r,{extensionCodec:so})}function lo(r){return io(),Fe.decode(r,{extensionCodec:so})}function Bn(r,e=!1){let t=On(r);if(t===null)return[!1,String(r)];let[n,a,i]=t;return i&&!e?[!1,String(r)]:[!0,`${a(r)}::${n}`]}function ja(r){if(!r.includes("::"))return[!1,r];let e=r.lastIndexOf("::"),t=r.slice(0,e),n=r.slice(e+2),a=dt[n];if(a===void 0)return[!1,r];let[,i]=a;return[!0,i(t)]}function In(r,e,t){if(r!==null&&typeof r=="object"&&!Array.isArray(r)){let n={};for(let[a,i]of Object.entries(r))n[a]=In(i,e,t);return n}return Array.isArray(r)?r.map(n=>In(n,e,t)):t(r)?e(r):r}function za(r){let e=On(r);if(e!==null){let[t,n,a]=e;return a?[r,!1]:[`${n(r)}::${t}`,!0]}if(Array.isArray(r)){let t=!1;return[r.map(a=>{let[i,s]=za(a);return s&&(t=!0),i}),t]}if(r!==null&&typeof r=="object"){let t=!1,n={};for(let[a,i]of Object.entries(r)){let[s,o]=za(i);o&&(t=!0),n[a]=s}return[n,t]}return[r,!1]}function $d(r,e=!1){let[t,n]=Bn(r,e);if(t)return n;let[a,i]=za(r),s=JSON.stringify(a);return i?`${s}::JS`:s}function Fd(r){return JSON.stringify(r)}function Ud(r){if(!Fe)throw new Error("@msgpack/msgpack is required for MessagePack support");return Fe.encode(r)}function Ee(r,e=null,{raw:t=!1,qs:n=!1,_forceSuffix:a=!1}={}){if(n)return`${co(r)}::QS`;if(t){if(e===null||e==="json")return Fd(r);if(e==="msgpack")return Ud(r);throw e==="xml"?new Error("raw=true is not supported for XML transport"):new Error(`Unknown transport: ${e}`)}if(e===null||e==="json"){let i=$d(r,a);return e==="json"?`"${i}"`:i}else{if(e==="xml")return`<?xml version="1.0" ?><tytx_root>${uo(r)}</tytx_root>`;if(e==="msgpack")return oo(r);throw new Error(`Unknown transport: ${e}`)}}var Jt,Va;typeof window<"u"&&window.DOMParser?(Jt=window.DOMParser,Va=window.XMLSerializer):(Jt=ro,Va=no);function fo(r){if(r===null||typeof r!="object"||Array.isArray(r))return!1;let e=Object.keys(r);if(e.length!==1)return!1;let t=r[e[0]];return t!==null&&typeof t=="object"&&"value"in t}function po(r,e,t){let n=r.createElement(e),a=t.attrs||{},i=t.value;for(let[s,o]of Object.entries(a))n.setAttribute(s,Ee(o,null,{_forceSuffix:!0}));if(Array.isArray(i))for(let s of i)if(fo(s)){let[o]=Object.keys(s),l=s[o],u=po(r,o,l);n.appendChild(u)}else{n.textContent=Ee(i);break}else n.textContent=Ee(i);return n}function uo(r){if(!Jt)throw new Error("XML support requires @xmldom/xmldom package in Node.js");if(fo(r)){let[e]=Object.keys(r),t=r[e],n=new Jt().parseFromString("<root/>","text/xml"),a=po(n,e,t);return new Va().serializeToString(a)}else return Ee(r)}function Ha(r){let e={};for(let n=0;n<r.attributes.length;n++){let a=r.attributes[n];e[a.name]=ie(a.value)}let t=[];for(let n=0;n<r.childNodes.length;n++){let a=r.childNodes[n];a.nodeType===1&&t.push(a)}if(t.length>0)if(t.length===1){let n=t[0],a=Ha(n);return{attrs:e,value:{[n.tagName]:a}}}else{let n=[];for(let a of t){let i=Ha(a);n.push({[a.tagName]:i})}return{attrs:e,value:n}}return{attrs:e,value:ie(r.textContent)}}function ho(r){if(!Jt)throw new Error("XML support requires @xmldom/xmldom package in Node.js");let n=new Jt().parseFromString(r,"text/xml").documentElement;if(n.tagName==="tytx_root"){let i=null;for(let s=0;s<n.childNodes.length;s++)if(n.childNodes[s].nodeType===1){i=n.childNodes[s];break}if(!i)return ie(n.textContent);n=i}let a=Ha(n);return{[n.tagName]:a}}function qd(r){return typeof r=="string"}function jd(r){let[e,t]=ja(r);if(e)return t;let n=r;n.endsWith("::JS")&&(n=n.slice(0,-4));let a;try{a=JSON.parse(n)}catch{return r}return In(a,zd,qd)}function zd(r){return r.includes("::")?ja(r)[1]:r}function Vd(r){let e=ho(r);return typeof e=="string"?ie(e):e}function Hd(r){return lo(r)}function ie(r,e=null){if(r===null)return null;if(e===null||e==="json"){let t=r;return e==="json"&&r.startsWith('"')&&r.endsWith('"')&&(t=r.slice(1,-1)),jd(t)}else{if(e==="xml")return Vd(r);if(e==="msgpack")return Hd(r);throw new Error(`Unknown transport: ${e}`)}}function co(r){if(Array.isArray(r))return r.map(e=>String(e)).join("&");if(r!==null&&typeof r=="object"){let e=[];for(let[t,n]of Object.entries(r)){let[a,i]=Bn(n,!0);a?e.push(`${t}=${i}`):e.push(`${t}=${n}`)}return e.join("&")}throw new TypeError(`toQs expects object or array, got ${typeof r}`)}function mo(r){if(!r)return[];let e=r.split("&"),t=e.map(s=>s.includes("=")),n=t.every(Boolean),a=!t.some(Boolean);if(!n&&!a)throw new Error("QS format error: mixed items with and without '='");if(a)return e.map(s=>ie(s));let i={};for(let s of e){let o=s.indexOf("="),l=s.slice(0,o),u=s.slice(o+1);i[l]=ie(u)}return i}var bo=Fa||Ua||Number,Wd=Fa?"decimal.js":Ua?"big.js":"number";function Sn(r){return new bo(r)}function Te(r){return Wd==="number"?!1:r instanceof bo}function xt(r){let e=r.getUTCFullYear()===1970&&r.getUTCMonth()===0&&r.getUTCDate()===1,t=r.getUTCHours()===0&&r.getUTCMinutes()===0&&r.getUTCSeconds()===0&&r.getUTCMilliseconds()===0;return e&&!t?"H":t&&!e?"D":"DHZ"}function Gd(r){return r.toString()}function Xd(r){let e=r.getUTCFullYear(),t=String(r.getUTCMonth()+1).padStart(2,"0"),n=String(r.getUTCDate()).padStart(2,"0");return`${e}-${t}-${n}`}function Yd(r){return r.toISOString()}function Zd(r){let e=String(r.getUTCHours()).padStart(2,"0"),t=String(r.getUTCMinutes()).padStart(2,"0"),n=String(r.getUTCSeconds()).padStart(2,"0"),a=String(r.getUTCMilliseconds()).padStart(3,"0");return`${e}:${t}:${n}.${a}`}function Jd(r){return r?"true":"false"}function Kd(r){return r.toString()}function Qd(r){return r.toString()}function ef(r){let e="";for(let t=0;t<r.length;t+=32768)e+=String.fromCharCode.apply(null,r.subarray(t,t+32768));return btoa(e)}var Mn=[],Wa=new Map;function qa(r){if(r===null||typeof r!="object")return null;for(let e=Object.getPrototypeOf(r);e!==null;e=Object.getPrototypeOf(e))for(let[t,n,a,i]of Mn)if(t.prototype===e)return[n,a,i];return null}function On(r){if(r===null)return["NN",()=>"",!0];if(Te(r))return["N",Gd,!1];if(r instanceof Uint8Array)return["RAW",ef,!1];if(r instanceof Date){let e=xt(r);return e==="D"?["D",Xd,!1]:e==="H"?["H",Zd,!1]:["DHZ",Yd,!1]}return typeof r=="boolean"?["B",Jd,!0]:typeof r=="number"?Number.isInteger(r)?["L",Kd,!0]:["R",Qd,!0]:qa(r)}function tf(r){return Sn(r)}function rf(r){let[e,t,n]=r.split("-").map(Number);return new Date(Date.UTC(e,t-1,n,0,0,0,0))}function go(r){return new Date(r)}function nf(r){let[e,t,n]=r.split(":"),[a,i]=n.split(".");return new Date(Date.UTC(1970,0,1,Number(e),Number(t),Number(a),Number(i||0)))}function af(r){return r.toLowerCase()==="true"}function sf(r){return parseInt(r,10)}function of(r){return parseFloat(r)}function lf(r){return r}function uf(r){return null}var cf=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/;function df(r){if(!cf.test(r))throw new Error(`RAW payload is not standard padded base64: '${r}'`);let e=atob(r),t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}function ff(r){return mo(r)}var pf=/^[A-Z]+$/,dt={N:[Object,tf],D:[Date,rf],DH:[Date,go],DHZ:[Date,go],H:[Date,nf],L:[Number,sf],R:[Number,of],T:[String,lf],B:[Boolean,af],QS:[Object,ff],NN:[null,uf],RAW:[Uint8Array,df]};function Nr(r){return Object.hasOwn(dt,r)?dt[r][0]:null}function Ga(r,e,t,n,a=!1){if(typeof e!="string"||!pf.test(e))throw new Error(`TYTX suffix '${e}' is invalid: expected uppercase ASCII letters only`);let i=dt[e];if(i!==void 0&&i[0]!==r){let s=i[0]===null?"null":i[0].name;throw new Error(`TYTX suffix '${e}' is already registered for ${s}`)}Mn=Mn.filter(([s])=>s!==r),Mn.push([r,e,t,a]),dt[e]=[r,n]}function Sr(r,e){Wa.set(r,e)}function Ge(r){return Wa.has(r)?Wa.get(r):{}}var _o={network:{maxAttempts:3,delay:1,backoff:2,jitter:!0,on:["TypeError","NetworkError","AbortError"]},aggressive:{maxAttempts:5,delay:.5,backoff:2,jitter:!0,on:["Error"]},gentle:{maxAttempts:2,delay:2,backoff:1.5,jitter:!1,on:["TypeError","NetworkError"]}};function mf(r){let e=r._retryPolicy;return e==null?null:typeof e=="string"?_o[e]||null:e}function gf(r,e){return e.some(t=>t==="Error"?!0:r.name===t||r.constructor.name===t)}function bf(r){return new Promise(e=>setTimeout(e,r))}async function _f(r,e){if(!e)return r();let t=e.maxAttempts||3,n=e.delay||1,a=e.backoff||2,i=e.jitter!==!1,s=e.on||["Error"],o=null,l=n*1e3;for(let u=0;u<t;u++)try{let c=r();return c instanceof Promise?await c:c}catch(c){if(o=c,u<t-1&&gf(c,s)){let d=l;i&&(d*=1+Math.random()*.1),await bf(d),l*=a}else throw c}throw o}var se=class r{static classKwargs={cacheTime:0,readOnly:!1,asBag:null,retryPolicy:null};static classArgs=[];static internalParams=new Set(["cacheTime","readOnly","asBag","retryPolicy"]);constructor(e={}){let n={...this.constructor.classKwargs,...e};for(let i of["interval","reactive"])if(Object.hasOwn(n,i))throw new TypeError(`Removed resolver option: ${i}. Schedule updates in the application; use reset() and read explicitly.`);this.cacheTime=n.cacheTime,this._readOnly=n.readOnly,this._asBag=n.asBag,this._retryPolicy=n.retryPolicy,this._kw={};let a=this.constructor.internalParams;for(let[i,s]of Object.entries(n))a.has(i)||(this._kw[i]=s);this._lastUpdate=null,this._node=null,this._lastEffectiveFingerprint=null,this._cachedValue=null,this.init()}init(){}setNode(e){e!==this._node&&!this.readOnly&&this._lastUpdate!==null&&this.reset(),this._node=e,this.onSetResolver(e)}onSetResolver(e){}get node(){return this._node}get cacheTime(){return this._cacheTime}set cacheTime(e){if(typeof e=="boolean")throw new TypeError("cacheTime must be numeric; use a negative value for infinite caching");this._cacheTime=e}get readOnly(){return this._readOnly}get expired(){return this._cacheTime<0?this._lastUpdate===null:this._cacheTime===0||this._lastUpdate===null?!0:(Date.now()-this._lastUpdate)/1e3>this._cacheTime}reset(...e){if(e.length)throw new TypeError("reset() takes no arguments. It invalidates the cache for the next explicit read.");this._lastUpdate=null,this._lastEffectiveFingerprint=null}get cachedValue(){return!this.readOnly&&this._node?this._node._value:this._cachedValue}set cachedValue(e){!this.readOnly&&this._node?this._node.setValue(e,!1):this._cachedValue=e}_computeEffectiveFingerprint(e){return JSON.stringify(Object.entries(e).sort())}_buildEffectiveKw(){let e={...this._kw};if(this._node&&this._node.attr)for(let t of Object.keys(this._kw))Object.hasOwn(this._node.attr,t)&&(e[t]=this._node.attr[t]);return e}resolve(e={}){let{static:t=!1,...n}=e;if(t)return this._node?this._node._value:this.cachedValue;let a=this._buildEffectiveKw();if(Object.keys(n).length>0)return this._load({...a,...n},s=>this._prepareValue(s));let i=this._computeEffectiveFingerprint(a);return i===this._lastEffectiveFingerprint&&!this.expired?this.cachedValue:(this._lastEffectiveFingerprint=i,this._load(a,s=>this._finalize(s)))}_load(e,t){let n=mf(this),a=()=>this.load(e);if(n)return _f(a,n).then(t);let i=a();return i&&typeof i.then=="function"?i.then(t):t(i)}_finalize(e){return e=this._prepareValue(e),this._lastUpdate=Date.now(),(!this.readOnly||this.cacheTime!==0)&&(this.cachedValue=e),e}_prepareValue(e){let t;return this._asBag===!0?t=!0:this._asBag===!1?t=!1:t=!this._readOnly,t&&e!==null&&e!==void 0&&(e=this._convertToBag(e)),e}_convertToBag(e){let t=r._BagClass;if(!t||e&&typeof e._htraverse=="function")return e;if(typeof e=="string"){if(e=e.trim(),e.startsWith("<")&&t.fromXml)return t.fromXml(e);if((e.startsWith("{")||e.startsWith("["))&&t.fromTytx)return t.fromTytx(e)}return e}static registerBagClass(e){r._BagClass=e}load(e){return null}};se._BagClass=null;var Ir=class extends se{static classKwargs={cacheTime:0,readOnly:!1,asBag:!1,retryPolicy:null,callback:null};static classArgs=["callback"];static internalParams=new Set(["cacheTime","readOnly","asBag","retryPolicy","callback"]);constructor(e={}){typeof e=="function"&&(e={callback:e}),super(e),this._callback=e.callback||null}load(e){return this._callback?this._callback.call(this,e):null}};var Xe=class r{constructor(e,t,n=null,a=null,i=null,s=null,o=null,l=!0){this.label=t,this._value=null,this._attr={},this._parentBag=null,this._resolver=null,this._nodeSubscribers={},this._onChangedValue=null,this.nodeTag=s,this.xmlTag=o,this._compiled=null,this.parentBag=e,a&&this.setAttr(a,!1,!0,l),n!==null&&this.setValue(n,!1),i&&(this.resolver=i)}get parentBag(){return this._parentBag}set parentBag(e){e===null&&this._value?.parentNode===this&&this._value.setBackref(),this._parentBag=e,e?.backref&&this._value&&typeof this._value._htraverse=="function"&&this._value.setBackref(this,e)}get value(){return this.getValue()}set value(e){this.setValue(e)}getValue(e=!1,t=null,n={}){if(t!==null){let a=ie(`${t}::QS`);if(Array.isArray(a)){let i=a.length?a:Object.keys(this._attr),s=i.map(l=>{let u=this.getAttr(l);return!e&&u instanceof se?u.resolve():u}),o=l=>a.length===0?Object.fromEntries(i.map((u,c)=>[u,l[c]])):l.length===1?l[0]:l;return s.some(l=>l&&typeof l.then=="function")?Promise.all(s).then(o):o(s)}else{if(!this._resolver)throw new Error("Cannot use kwargs syntax without resolver");n={...n,...a}}}return this._resolver!==null?this._resolver.resolve({static:e,...n}):this._value}setValue(e,t=!0,n=null,a=null,i=!0,s=null,o=!1){e instanceof se?(this.resolver=e,e=null):e instanceof r&&(n=n||{},Object.assign(n,e._attr),e.resolver&&(this.resolver=e.resolver),e=e._value);let l=this._value;l!==e&&l?.parentNode===this&&l.setBackref(),this._value=e;let u=l!==this._value,c=t??!0,d=null;if(n!==null){let p={...this._attr};this.setAttr(n,!1,a,i);let h=this._buildAttrDiff(p,this._attr);d=Object.keys(h).length>0?h:null}t=c&&(u||d!==null);let f=d?u?"upd_value_attr":"upd_attrs":"upd_value";if(this._onChangedValue&&this._onChangedValue(this,e,l,c),t){let p=d!==null?{oldvalue:l,attrs_diff:d}:{oldvalue:l};for(let h of Object.values(this._nodeSubscribers))h({node:this,info:p,evt:f})}this._parentBag!==null&&this._parentBag.backref&&(e&&typeof e._htraverse=="function"&&e.setBackref(this,this._parentBag),t&&this._parentBag._onNodeChanged(this,[this.label],f,l,d,s,o))}replace(e){if(!(e instanceof r))throw new TypeError("BagNode.replace expects a BagNode");if(e===this)return this;let t=e.staticValue;t&&typeof t._htraverse=="function"&&(t=t.createChildBag().replace(t));let n=null;e.resolver&&(n=Object.create(Object.getPrototypeOf(e.resolver),Object.getOwnPropertyDescriptors(e.resolver)),n._node=null,n._kw={...e.resolver._kw});let a=this._value,i={...this._attr},s=this.resolver;s&&s._node===this&&(s._node=null),this.resolver=n,this.setValue(t,!1,{...e.attr},!1,!1,null);let o=this._buildAttrDiff(i,this._attr),l=Object.keys(o).length?o:null,u=a!==t||s!==n;if(u||l){let c=l?u?"upd_value_attr":"upd_attrs":"upd_value",d=l?{oldvalue:a,attrs_diff:l}:{oldvalue:a};for(let f of Object.values(this._nodeSubscribers))f({node:this,info:d,evt:c});this._parentBag!==null&&this._parentBag.backref&&this._parentBag._onNodeChanged(this,[this.label],c,a,l)}return this}get staticValue(){return this._value}set staticValue(e){this._value=e}get resolver(){return this._resolver}set resolver(e){this._resolver=e,e&&e.setNode&&e.setNode(this)}resetResolver(){if(!this._resolver)throw new Error("Cannot reset resolver: node has no resolver");this._resolver.reset(),this.setValue(null)}get attr(){return this._attr}getAttr(e=null,t=null){return e?e in this._attr?this._attr[e]:t:this._attr}_buildAttrDiff(e,t){let n={},a=new Set([...Object.keys(e),...Object.keys(t)]);for(let i of a){let s=i in e?e[i]:null,o=i in t?t[i]:null;s!==o&&(n[i]={old:s,new:o})}return n}setAttr(e=null,t=!0,n=!0,a=!0){let i=e||{},s=Object.keys(this._nodeSubscribers).length>0,l=t&&(s||this._parentBag!==null&&this._parentBag.backref)?{...this._attr}:null;if(n?Object.assign(this._attr,i):this._attr={...i},a)for(let u of Object.keys(this._attr))this._attr[u]===null&&delete this._attr[u];if(t&&l!==null){let u=this._buildAttrDiff(l,this._attr);if(Object.keys(u).length>0&&s)for(let c of Object.values(this._nodeSubscribers))c({node:this,info:{attrs_diff:u},evt:"upd_attrs"});if(Object.keys(u).length>0&&this._parentBag!==null&&this._parentBag.backref){let c=t===!0?"true":String(t);this._parentBag._onNodeChanged(this,[this.label],"upd_attrs",null,u,c)}}}delAttr(...e){for(let t of e)if(typeof t=="string"&&t.includes(","))for(let n of t.split(","))delete this._attr[n.trim()];else delete this._attr[t]}hasAttr(e,t=null){return e in this._attr?t!==null?this._attr[e]===t:!0:!1}getInheritedAttributes(){let e={};return this._parentBag&&this._parentBag.parentNode&&(e=this._parentBag.parentNode.getInheritedAttributes()),{...e,...this._attr}}subscribe(e,t){this._nodeSubscribers[e]=t}unsubscribe(e){delete this._nodeSubscribers[e]}get compiled(){return this._compiled||(this._compiled={}),this._compiled}get isBranch(){return this._value!=null&&typeof this._value._htraverse=="function"}get position(){return this._parentBag===null?null:this._parentBag._nodes.index(this.label)}get fullpath(){if(this._parentBag!==null){let e=this._parentBag.fullpath;return e?`${e}.${this.label}`:this.label}return null}get parentNode(){return this._parentBag?this._parentBag.parentNode:null}attributeOwnerNode(e,t=null){let n=this;if(t===null)for(;n&&!(e in n._attr);)n=n.parentNode;else for(;n&&n._attr[e]!==t;)n=n.parentNode;return n}asTuple(){return[this.label,this.value,this._attr,this._resolver||null]}isEqual(e){if(!(e instanceof r)||this.label!==e.label)return!1;let t=Object.keys(this._attr),n=Object.keys(e._attr);if(t.length!==n.length)return!1;for(let a of t)if(this._attr[a]!==e._attr[a])return!1;return this._resolver!==null?this._resolver===e._resolver:this._value&&typeof this._value.equalTo=="function"?this._value.equalTo(e._value):this._value&&typeof this._value.isEqual=="function"?this._value.isEqual(e._value):this._value===e._value}diff(e){if(this.label!==e.label)return`Other label: ${e.label}`;let t=Object.keys(this._attr),n=Object.keys(e._attr);return t.length!==n.length||t.some(a=>this._attr[a]!==e._attr[a])?`attributes self:${JSON.stringify(this._attr)} --- other:${JSON.stringify(e._attr)}`:this._value!==e._value?`value self:${this._value} --- other:${e._value}`:null}toJson(e=!0){let t=this.value;return t&&typeof t.toJson=="function"&&(t=t.toJson(e,!0)),{label:this.label,value:t,attr:this._attr}}toString(){return`BagNode : ${this.label}`}};var Br=class r{constructor(){this._dict=Object.create(null),this._list=[],this._parentBag=null}index(e){if(e in this._dict)return this._list.findIndex(n=>n.label===e);let t=e.match(/^#(\d+)$/);if(t){let n=parseInt(t[1],10);return n<this._list.length?n:-1}if(t=e.match(/^#(\w*)=(.*)$/),t){let[,n,a]=t,i=a.includes("::")?ie(a):a;return n?this._list.findIndex(s=>s.getAttr(n)===i):this._list.findIndex(s=>s._value===i)}return-1}_parsePosition(e){let t=this._list.length;if(e==null||e===">")return t;if(typeof e=="number")return e<0&&(e=t+e),Math.max(0,Math.min(e,t));if(e==="<")return 0;if(e.startsWith("#")){let n=this._parseSharpIndex(e.slice(1),e);return Math.min(n,t)}if(e.startsWith("<")){let n=e.slice(1);if(n.startsWith("#")){let i=this._parseSharpIndex(n.slice(1),e);return Math.min(i,t)}let a=this.index(n);if(a<0)throw new Error(`Invalid node_position '${e}': label '${n}' not found`);return a}if(e.startsWith(">")){let n=e.slice(1);if(n.startsWith("#")){let i=this._parseSharpIndex(n.slice(1),e);return Math.min(i+1,t)}let a=this.index(n);if(a<0)throw new Error(`Invalid node_position '${e}': label '${n}' not found`);return a+1}throw new Error(`Invalid node_position '${e}': unrecognized syntax`)}_parseSharpIndex(e,t){if(!/^-?\d+$/.test(e))throw new Error(`Invalid node_position '${t}': '${e}' is not an integer`);let n=parseInt(e,10);if(n<0)throw new Error(`Invalid node_position '${t}': negative index not allowed in '#n' syntax`);return n}get(e){if(typeof e=="number")return e>=0&&e<this._list.length?this._list[e]:null;if(e.startsWith("#")){let t=this.index(e);return t>=0?this._list[t]:null}return this._dict[e]||null}set(e,t,n=">",a=null,i=null,s=null,o=!1,l=!0,u=null,c=!0,d=!1,f=null){let p=null;if(e.includes("?")&&([e,p]=e.split("?",2)),e==null||e.startsWith("#"))throw new Error("Cannot create new node with #n syntax");if(p){let m=p.split("&");if(m.length===1)a={[m[0]]:t};else{if(!Array.isArray(t)||t.length!==m.length)throw new Error("Wrong attributes assignment");a={};for(let g=0;g<m.length;g++)a[m[g]]=t[g]}t=null}let h=this._dict[e];if(h)f&&(h.nodeTag=f),s!==null&&(s===!1?h.resolver=null:h.resolver=s),p?h.setAttr(a,c,!0,l):h.setValue(t,c,a,o,l,u,d);else{let m=i&&i.nodeClass?i.nodeClass:Xe;h=new m(i,e,p?null:t,a,s,f,null,l);let g=this._parsePosition(n);this._dict[e]=h,this._list.splice(g,0,h),c&&i&&i.backref&&i._onNodeInserted(h,g,null,u,d)}return d&&h.setValue(null,!1),h}pop(e){let t=this.get(e);if(t){delete this._dict[t.label];let n=this._list.indexOf(t);return n>=0&&this._list.splice(n,1),t}return null}has(e){return e in this._dict}get length(){return this._list.length}clear(){this._dict=Object.create(null),this._list=[]}keys(){return this._list.map(e=>e.label)}values(){return this._list.map(e=>e.getValue())}items(){return this._list.map(e=>[e.label,e.getValue()])}[Symbol.iterator](){return this._list[Symbol.iterator]()}move(e,t,n=!0){if(t<0)return;let a=Array.isArray(e)?e:[e];if(a.length===0||t>=this._list.length)return;let i=this._list[t].label;if(a.length>1){let s=[...a].sort((c,d)=>c-d),o=s[0]<t?1:0,l=[];for(let c=s.length-1;c>=0;c--){let d=s[c];if(d>=0&&d<this._list.length){let f=this._list[d];this._list.splice(d,1),l.push(f),n&&this._parentBag&&this._parentBag.backref&&this._parentBag._onNodeDeleted(f,d)}}let u=this.index(i);u<0&&(u=this._list.length),u+=o;for(let c of l)this._list.splice(u,0,c),n&&this._parentBag&&this._parentBag.backref&&this._parentBag._onNodeInserted(c,u)}else{let s=a[0];if(s===t||s<0||s>=this._list.length)return;let o=this._list[s];this._list.splice(s,1),n&&this._parentBag&&this._parentBag.backref&&this._parentBag._onNodeDeleted(o,s),this._list.splice(t,0,o),n&&this._parentBag&&this._parentBag.backref&&this._parentBag._onNodeInserted(o,t)}}isEqual(e){if(!(e instanceof r)||this._list.length!==e._list.length)return!1;for(let t=0;t<this._list.length;t++){let n=this._list[t],a=e._list[t];if(!n.isEqual(a))return!1}return!0}};var xo=mi($a(),1);var Xa="::RSLV:",wf=new Map,yf=new Map,Rn=new WeakMap,K=class extends Error{constructor(e){super(e),this.name="BagSerializationError"}},Or=class extends se{constructor(e){super({asBag:!1}),Rn.set(this,e)}get payload(){return Rn.get(this)}load(){throw new K("This resolver is opaque; local execution is unavailable")}};function wo(r){if(!r||typeof r!="object"||Array.isArray(r)||typeof r.resolver_module!="string"||typeof r.resolver_class!="string"||!Array.isArray(r.args??[])||!r.kwargs||typeof r.kwargs!="object"||Array.isArray(r.kwargs))throw new K("Invalid resolver description")}function yo(r,e=new Set){if(!(r===null||typeof r=="string"||typeof r=="boolean")&&!(typeof r=="number"&&Number.isFinite(r))){if(typeof r!="object"||e.has(r)||!Array.isArray(r)&&Object.getPrototypeOf(r)!==Object.prototype&&Object.getPrototypeOf(r)!==null)throw new K("Resolver parameters must be JSON data; callbacks cannot travel");e.add(r);for(let t of Object.values(r))yo(t,e);e.delete(r)}}function Mr(r){if(Rn.has(r))return Rn.get(r);let e=yf.get(r.constructor);if(!e)throw new K(`Unregistered resolver: ${r.constructor.name}`);let t=e.encode(r),n={resolver_module:e.module,resolver_class:e.name,args:t.args??[],kwargs:t.kwargs??{}};return wo(n),yo(n),Xa+JSON.stringify(n)}function Ln(r){if(typeof r!="string"||!r.startsWith(Xa))return null;let e=r.slice(Xa.length);if(/^[A-Za-z0-9_-]+\.[A-Za-z0-9_-]*\.[A-Za-z0-9_-]+$/.test(e))return new Or(r);let t;try{t=JSON.parse(e)}catch{throw new K("Invalid resolver JSON or signed token")}wo(t);let n=wf.get(JSON.stringify([t.resolver_module,t.resolver_class]));if(!n)return new Or(r);let a=n.decode({args:t.args??[],kwargs:t.kwargs});if(!(a instanceof n.cls))throw new K("Resolver decoder returned an incompatible instance");return a}function Pn(r){return Object.fromEntries(Object.entries(r||{}).map(([e,t])=>[e,t instanceof se?Mr(t):t]))}function Ya(r){return Object.fromEntries(Object.entries(r||{}).map(([e,t])=>[e,Ln(t)??t]))}var Ie="__cls";function Kt(r,e){return r!==null&&r.tytxSuffix===e?r:Nr(e)}function vf(r){let e=r.tytxSuffix,t=Object.entries(Ge(e)).filter(([,n])=>n===r).map(([n])=>n);if(t.length===0)throw new K(`${r.name} is not in the TYTX subtype dictionary of '${e}'`);if(t.length>1)throw new K(`${r.name} is in the TYTX subtype dictionary of '${e}' under several names: ${t.sort().join(", ")}`);return t[0]}function Za(r,e){let t=Ge(r);if(!Object.hasOwn(t,e))throw new K(`Unknown Bag class '${e}' for TYTX type '${r}'`);return t[e]}function Ja(r,e){return r===e?null:vf(r)}function*Eo(r,e=[]){for(let t of r){let n=[...e,t.label];yield[n,t];let a=t.getValue(!0);!t.resolver&&a instanceof le&&(yield*Eo(a,n))}}function xf(r){let e=r.toISOString(),t=r.getUTCFullYear()===1970&&r.getUTCMonth()===0&&r.getUTCDate()===1,n=r.getUTCHours()===0&&r.getUTCMinutes()===0&&r.getUTCSeconds()===0&&r.getUTCMilliseconds()===0;if(n&&!t)return e.slice(0,e.indexOf("T"));let a=e.replace(/\.000Z$/,"Z");return t&&!n?a.slice(a.indexOf("T")+1):a}function Qt(r){if(r===null||typeof r!="object")return!1;let e=Object.getPrototypeOf(r);return e===Object.prototype||e===null}function ft(r){return typeof r=="string"?r.includes("::")?`${r}::T`:r:Array.isArray(r)?r.map(ft):Qt(r)?Object.fromEntries(Object.entries(r).map(([e,t])=>[e,ft(t)])):r}function Ka(r){if(!Qt(r))throw new TypeError("Bag options must be an object");let{recursive:e=!0}=r;if(typeof e!="boolean")throw new TypeError("recursive must be a boolean");return e}var vo=!1,le=class r{static tytxSuffix="X";constructor(e=null,t={}){this._nodes=new Br,this._backref=!1,this._parent=null,this._parentNode=null,this._rootAttributes=null,this._updSubscribers={},this._insSubscribers={},this._delSubscribers={},Ka(t),e!=null&&this.fillFrom(e,t)}get parent(){return this._parent}set parent(e){this._parent=e}get parentNode(){return this._parentNode}set parentNode(e){this._parentNode=e}get backref(){return!!this._backref}get nodeClass(){return Xe}createChildBag(){return new this.constructor}get fullpath(){if(this._parent!==null&&this._parentNode!==null){let e=this._parent.fullpath;return e?`${e}.${this._parentNode.label}`:this._parentNode.label}return null}relativePath(e){let t=[],n=e;for(;n!==null;){if(n.parentBag===this)return t.push(n.label),t.reverse(),t.join(".");t.push(n.label),n=n.parentNode}return null}get length(){return this._nodes.length}get root(){let e=this;for(;e.parent!==null;)e=e.parent;return e}get attributes(){return this._parentNode!==null?this._parentNode.getAttr():{}}get rootAttributes(){return this._rootAttributes}set rootAttributes(e){this._rootAttributes=e!==null?{...e}:null}_htraverseBefore(e){let t=this,n;for(typeof e=="string"?(e=e.replace(/\.\.\//g,"#parent."),n=e.split(".").filter(a=>a)):n=[...e];n.length&&n[0]==="#parent"&&t!==null;)n.shift(),t=t.parent;return[t,n]}_htraverse(e,t=!1,n=!0){let[a,i]=this._htraverseBefore(e);if(a===null)return[null,null];if(i.length===0)return[a,""];for(;i.length>1&&a instanceof r;){let s=i[0];if(s==="#parent"){if(a.parent===null||a.parent===void 0)break;i.shift(),a=a.parent;continue}let o=a._nodes.get(s);if(!o)break;let l=o.getValue(n);if(l instanceof r)i.shift(),a=l;else if(t){let u=a.createChildBag();o.setValue(u,!0,null,!0,!0,"autocreate"),i.shift(),a=u}else break}if(!t)return i.length>1?[null,null]:[a,i[0]];for(;i.length>1;){let s=i.shift();if(s.startsWith("#"))throw new Rr("Not existing index in #n syntax");let o=a.createChildBag();a._nodes.set(s,o,">",null,a,null,!1,!0,"autocreate"),a=o}return[a,i[0]]}get(e,t=null,n=!0,a={}){if(!e)return this;if(e==="#parent")return this.parent;let i=null;e.includes("?")&&([e,i]=e.split("?",2));let s=this._nodes.get(e);return s?s.getValue(n,i,a):t}getItem(e,t=null,n=!1,a={}){if(!e)return this;let[i,s]=this._htraverse(e,!1,n);return i instanceof r?i.get(s,t,n,a):t}setItem(e,t,n=null,a=">",i=!1,s=!0,o=null,l=!1,u=!0,c=null,d=null){if(e==="")throw new RangeError("setItem requires a non-empty path");let[f,p]=this._htraverse(e,!0);return f._nodes.set(p,t,a,n,f,c,i,s,o,u,l,d)}_pop(e,t=null){let n=this._nodes.index(e);if(n>=0){let a=this._nodes.pop(n);return this.backref&&this._onNodeDeleted(a,n,null,t),a}return null}pop(e,t=null,n=null){let a=this.popNode(e,n);return a?a.value:t}delItem(e,t=null,n=null){return this.pop(e,t,n)}popNode(e,t=null){let[n,a]=this._htraverse(e,!1,!0);if(!n||!a)return null;let i=n._nodes.get(a);if(!i)return null;try{return n._pop(a,t)}finally{i.parentBag===n&&n._nodes._dict[i.label]!==i&&(i.parentBag=null)}}clear(){let e=[...this._nodes];this._nodes.clear(),this.backref&&this._onNodeDeleted(e,-1);for(let t of e)t.parentBag=null}getNode(e,t=!0,n=!1,a=null){if(e==null||e==="")return this.parentNode;if(typeof e=="number")return this._nodes.get(e);typeof e=="string"&&(e=e.split("?",1)[0]);let[i,s]=this._htraverse(e,n,t);if(i instanceof r&&s){let o=i._nodes.get(s);if(o)return o;if(n)return i._nodes.set(s,a,">",null,i,null,!1,!0,"autocreate"),i._nodes.get(s)}return null}setBackref(e=null,t=null){let n=this._backref;if(this._backref=!0,this._parent=t,this._parentNode=e,!n){this._nodes._parentBag=this;for(let a of this)a.parentBag=this}}delParentRef(){this._parent=null,this._parentNode=null,this._backref=!1}clearBackref(){if(this._backref){this._backref=!1,this._parent=null,this._parentNode=null,this._nodes._parentBag=null;for(let e of this){e.parentBag=null;let t=e.getValue(!0);t instanceof r&&t.clearBackref()}}}_onNodeChanged(e,t,n,a=null,i=null,s=null,o=!1){for(let l of Object.values(this._updSubscribers))l({node:e,pathlist:t,oldvalue:a,attrs_diff:i,evt:n,reason:s,fired:o});this._parent&&this._parentNode&&this._parent._onNodeChanged(e,[this._parentNode.label,...t],n,a,i,s,o)}_onNodeInserted(e,t,n=null,a=null,i=!1){let s=e.parentBag,o=e.getValue(!0);s!==null&&s.backref&&o instanceof r&&o.setBackref(e,s),n===null&&(n=[]);for(let l of Object.values(this._insSubscribers))l({node:e,pathlist:n,ind:t,evt:"ins",reason:a,fired:i});this._parent&&this._parentNode&&this._parent._onNodeInserted(e,t,[this._parentNode.label,...n],a,i)}_onNodeDeleted(e,t,n=null,a=null){for(let i of Object.values(this._delSubscribers))i({node:e,pathlist:n,ind:t,evt:"del",reason:a});this._parent&&this._parentNode&&(n===null&&(n=[]),this._parent._onNodeDeleted(e,t,[this._parentNode.label,...n],a))}_subscribe(e,t,n){n!=null&&(t[e]=n)}subscribe(e,t={}){if(Object.hasOwn(t,"timer")||Object.hasOwn(t,"interval"))throw new TypeError("Timer subscriptions were removed. Schedule polling in the application.");let{update:n=null,insert:a=null,delete:i=null,any:s=null}=t;this.backref||this.setBackref(),this._subscribe(e,this._updSubscribers,n||s),this._subscribe(e,this._insSubscribers,a||s),this._subscribe(e,this._delSubscribers,i||s)}unsubscribe(e,t={}){if(Object.hasOwn(t,"timer")||Object.hasOwn(t,"interval"))throw new TypeError("Timer subscriptions were removed. Schedule polling in the application.");let{update:n=!1,insert:a=!1,delete:i=!1,any:s=!1}=t;(n||s)&&delete this._updSubscribers[e],(a||s)&&delete this._insSubscribers[e],(i||s)&&delete this._delSubscribers[e]}[Symbol.iterator](){return this._nodes[Symbol.iterator]()}keys(){return this._nodes.keys()}values(){return this._nodes.values()}items(){return[...this._nodes].map(e=>({key:e.label,value:e.getValue()}))}get nodes(){return this.getNodes()}node(e){return this._nodes.get(e)}setAttr(e=null,t=null,n=!0){let a=r.prototype.getNode.call(this,e,!0,!0);a&&a.setAttr(t,!0,!0,n)}getAttr(e=null,t=null,n=null){let a=this.getNode(e);return a?a.getAttr(t,n):n}delAttr(e=null,...t){let n=this.getNode(e);n&&n.delAttr(...t)}getInheritedAttributes(){return this._parentNode?this._parentNode.getInheritedAttributes():{}}getNodes(e=null){return e?[...this._nodes].filter(t=>e(t)):[...this._nodes]}getNodeByValue(e,t){for(let n of this._nodes){let a=n.value;if(a instanceof r){if(a.getItem(e)===t)return n}else if(a&&a.get&&a.get(e)===t)return n}return null}getNodeByAttr(e,t,n=!1,a=!1){let i=t===void 0,s=n&&typeof t=="string"?t.toLowerCase():t,o=l=>{let u=[];for(let c of l._nodes){if(e in c.attr){let d=n&&typeof c.attr[e]=="string"?c.attr[e].toLowerCase():c.attr[e];if(i||d==s)return c}if(c._value instanceof r)if(a){let d=o(c._value);if(d)return d}else u.push(c._value)}for(let c of u){let d=o(c);if(d)return d}return null};return o(this)}isEmpty(e=!1,t=!1){if(this._nodes.length===0)return!0;for(let n of this._nodes){if(n._resolver!==null)return!1;let a=n.getValue(!0);if(a!=null&&!(e&&a===0)&&!(t&&a===""))return!1}return!0}query(e=null,t=null,n=!1,a=!1,i=!0,s=!0,o=null,l=!0){e||(e="#k,#v,#a");let u=this,c;if(typeof e=="string"){if(e.includes(":")){let[p,h]=e.split(":");u=this.getItem(p),e=h}c=e.split(",").map(p=>p.trim())}else c=e;let d=(p,h,m,g,b)=>{if(h==="#k")return p.label;if(h==="#p")return m;if(h==="#n")return p;if(typeof h=="function")return h(p);if(h==="#v"){let y=b();return g&&y instanceof r?null:y}else if(h.startsWith("#v.")){let y=h.split(".").slice(1).join("."),v=b();return v&&v.getItem?v.getItem(y):null}else{if(h==="#__v")return p.getValue(!0);if(h.startsWith("#a")){let y=h.includes(".")?h.split(".").slice(1).join("."):null;return p.getAttr(y)}else{let y=b();return y&&y.getItem?y.getItem(h):null}}};function*f(){let p=0;function*h(m,g){for(let b of m._nodes){let y=g?`${g}.${b.label}`:b.label,v=!1,w,D=()=>(v||(w=b.getValue(l),v=!0),w);if((i&&s||(D()instanceof r?s:i))&&(t===null||t(b))&&(yield c.length===1?d(b,c[0],y,a,D):c.map($=>d(b,$,y,a,D)),p++,o!==null&&p>=o))return;if(a){let $=D();if($ instanceof r&&(yield*h($,y),o!==null&&p>=o))return}}}yield*h(u,"")}return n?f():[...f()]}getLeaves(){let e=[],t=(n,a)=>{for(let i of n._nodes){let s=a?`${a}.${i.label}`:i.label,o=i.getValue(!1);o instanceof r?t(o,s):e.push([s,o])}};return t(this,""),e}digest(e=null,t=null,n=!1){typeof t=="boolean"&&(console.warn("Bag.digest(what, asColumns) is deprecated; use digest(what, null, asColumns)."),n=t,t=null);let a=this.query(e,t,!1,!1,!0,!0,null,!1);if(n){if(!a||a.length===0)return(typeof e=="string"?e:"#k,#v,#a").split(",").map(l=>l.trim()).map(()=>[]);let i=[...a];if(i.length&&Array.isArray(i[0])){let s=i[0].length,o=[];for(let l=0;l<s;l++)o.push(i.map(u=>u[l]));return o}return[i]}return[...a]}columns(e,t=!1){typeof e=="string"&&(e=e.split(","));let n=t?"#a.":"",a=e.map(i=>`${n}${i}`).join(",");return this.digest(a,null,!0)}sum(e="#v",t=!1,n=null){if(t!=null&&typeof t!="boolean")throw new TypeError("sum strict must be a boolean; pass condition as the third argument");if(n!=null&&typeof n!="function")throw new TypeError("sum condition must be callable; deep is no longer supported");let a=i=>{let s=0,o=!1;for(let l of this.query(i,n)){if(l==null||l===""){o=!0;continue}if(typeof l!="number"&&typeof l!="boolean"){if(t)throw new TypeError(`sum encountered non-numeric value: ${typeof l}`);continue}s+=l}return t&&o?null:s};return e.includes(",")?e.split(",").map(i=>a(i.trim())):a(e)}sort(e="#k:a"){let t=(a,i)=>a==null?[-1,""]:i&&typeof a=="string"?[0,a.toLowerCase()]:[0,a],n=(a,i)=>a[0]!==i[0]?a[0]-i[0]:a[1]<i[1]?-1:a[1]>i[1]?1:0;if(typeof e=="function")this._nodes._list.sort((a,i)=>{let s=e(a),o=e(i);return s<o?-1:s>o?1:0});else{let a=e.split(",");a.reverse();for(let i of a){let s,o;i.includes(":")?[s,o]=i.split(":",2):(s=i,o="a"),s=s.trim(),o=o.trim();let l=o==="d"||o==="D",u=o==="a"||o==="d",c;if(s.toLowerCase()==="#k")c=d=>t(d.label,u);else if(s.toLowerCase()==="#v")c=d=>t(d.value,u);else if(s.toLowerCase().startsWith("#a.")){let d=s.slice(3);c=f=>t(f.getAttr(d),u)}else c=d=>{let f=d.value,p=f instanceof r?f.getItem(s):f?f[s]:null;return t(p,u)};this._nodes._list.sort((d,f)=>{let p=n(c(d),c(f));return l?-p:p})}}return this}equalTo(e){return e instanceof r?this._nodes.isEqual(e._nodes):!1}has(e){if(typeof e=="string"){let t=null;e.includes("?")&&([e,t]=e.split("?",2));let n=this.getNode(e);return n===null?!1:t===null?!0:t.split("&").every(a=>a in n.attr)}else if(e&&e.label!==void 0)return[...this._nodes].includes(e);return!1}getResolver(e){let t=this.getNode(e);return t?t.resolver:null}setResolver(e,t){let n=this.getNode(e);n||(this.setItem(e,null),n=this.getNode(e)),n.resolver=t}setCallbackItem(e,t,n={}){let a=new Ir({callback:t,...n});this.setResolver(e,a)}move(e,t,n=!0){this._nodes.move(e,t,n)}asDict(e=!1,t=!1,n=!1,a=!1){let i={};for(let s of this._nodes){let o=s.value;if(a&&o==null)continue;let l=s.label;e&&(l=String(l)),t&&(l=l.toLowerCase()),n&&o instanceof r&&(o=r.prototype.asDict.call(o,e,t,n,a)),Object.defineProperty(i,l,{value:o,enumerable:!0,writable:!0,configurable:!0})}return i}setdefault(e,t=null){let n=this.getNode(e);return n?n.value:(this.setItem(e,t),t)}deepcopy(e=!1){let t=this.createChildBag();for(let n of this._nodes){let a=n.getValue(!e);a instanceof r&&(a=a.deepcopy(e));let i=new t.nodeClass(t,n.label,a);i.setAttr({...n.attr},!1,!1,!1),i.nodeTag=n.nodeTag,i.xmlTag=n.xmlTag,t._nodes._list.push(i),t._nodes._dict[i.label]=i}return t}update(e,t=null,n=null,a=!1){if(!(e instanceof r)){for(let i in e){let s=e[i];(!a||s!==null||!this._nodes.has(i))&&this.setItem(i,s,null,">",!1,!1,n,!1,n!==!1)}return}for(let i of[...e]){let s=i.label,o=t==="static"?i.resolver:null,l=o?null:i.getValue(),u=i.attr.__replace;delete i.attr.__replace;let c=this._nodes.get(s);if(c)if(c.setAttr(i.attr,n===null?!0:n,!0,!1),i.nodeTag!=null&&(c.nodeTag=i.nodeTag),i.xmlTag!=null&&(c.xmlTag=i.xmlTag),o)c.resolver=o,c.setValue(null,n===null?!0:n,null,null,!1,n);else{i.resolver&&(c.resolver=null);let d=c.getValue();l instanceof r&&d instanceof r&&!u?d.update(l,t,n,a):(!a||l!==null)&&c.setValue(l,n===null?!0:n,null,null,!1,n)}else{let d=this.setItem(s,o||l,i.attr,">",!1,!1,n,!1,n!==!1);d.nodeTag=i.nodeTag,d.xmlTag=i.xmlTag}}}_fillFromBag(e){this.clear();for(let t of e){let n=new this.nodeClass(this,t.label);n.replace(t),n.nodeTag=t.nodeTag,n.xmlTag=t.xmlTag,this._nodes._list.push(n),this._nodes._dict[n.label]=n}}_appendLiteral(e,t,n=null,a=null,i=null){if(typeof e!="string")throw new TypeError("Bag labels must be strings");let s=new this.nodeClass(this,e,null,n,a,i,null,!1);return t instanceof se?s.resolver=t:s._value=t,this._nodes._dict[e]=s,this._nodes._list.push(s),s}fillFrom(e=null,t={}){let n=Ka(t);if(e!=null&&!Qt(e)&&!Array.isArray(e))throw new TypeError("Bag source must be a dictionary, array or null");let a=this.createChildBag(),i=new Set,s=(o,l,u)=>{if(i.has(l))throw new TypeError(`Cyclic Bag source at ${u}`);i.add(l);try{let c=Array.isArray(l)?String(l.length).length+1:0,d=Array.isArray(l)?Array.from(l,(f,p)=>[`r_${String(p).padStart(c,"0")}`,f]):Object.entries(l);if(!Array.isArray(l)&&Object.getOwnPropertySymbols(l).some(f=>Object.prototype.propertyIsEnumerable.call(l,f)))throw new TypeError(`Bag labels must be strings at ${u}`);for(let[f,p]of d){let h=p;n&&(Qt(h)||Array.isArray(h))&&(h=this.createChildBag(),s(h,p,`${u}[${JSON.stringify(f)}]`)),o._appendLiteral(f,h)}}finally{i.delete(l)}};return e!=null&&s(a,e,"$"),this._replacePrepared(a)}_loadSource(e,t={}){return this.fillFrom(e,t)}replace(e){if(!(e instanceof r))throw new TypeError("Bag.replace expects a Bag");if(e===this)return this;let t=this.createChildBag();return t._fillFromBag(e),this._replacePrepared(t)}_replacePrepared(e){for(let n of this._nodes){n.parentBag=null;let a=n.getValue(!0);a instanceof r&&a.clearBackref()}let t=this._nodes;this._nodes=e._nodes,e._nodes=t,this._nodes._parentBag=this.backref?this:null,e._nodes._parentBag=null;for(let n of this._nodes)n.parentBag=this;for(let n of e._nodes)n._parentBag=e;return this.backref&&this.parent&&this.parentNode&&this.parent._onNodeChanged(this.parentNode,[this.parentNode.label],"upd_value",e),this}forEach(e,{static:t=!0,deep:n=!1,kwargs:a={}}={}){if(typeof e!="function")throw new TypeError("forEach requires a callback");let i=(s,o)=>{for(let l=0;l<s._nodes.length;l++){let u=s._nodes._list[l],c={...o};"_pathlist"in o&&(c._pathlist=[...o._pathlist,u.label]),"_indexlist"in o&&(c._indexlist=[...o._indexlist,l]);let d=e(u,c,l);if(d)return d;if(d==null&&n){let f=u.getValue(t);if(f instanceof r){let p=i(f,c);if(p)return p}}}return null};return i(this,a)}*traverse(){for(let e of this._nodes){yield e;let t=e.getValue(!0);t instanceof r&&(yield*t.traverse())}}*_iterNodesWithPaths(e=!0,t=""){for(let n of this._nodes){let a=t?`${t}.${n.label}`:n.label;yield[a,n];let i=n.getValue(e);i instanceof r&&(yield*i._iterNodesWithPaths(e,a))}}*_nodeFlattener(e=null){let t=e!==null,n=t?Object.create(null):null,a=0,i=new Map([["[]",this.constructor]]);for(let[s,o]of Eo(this)){let l=s.slice(0,-1),u=JSON.stringify(s),c=JSON.stringify(l),d=o.getValue(!0),f,p=null;if(o.resolver)f=Mr(o.resolver);else if(d instanceof r){let g=d.constructor,b=g.tytxSuffix;i.set(u,g),p=Ja(g,Kt(i.get(c),b)),f=`::${b}`}else d===null?f="::NN":f=ft(d);if(o.attr&&Object.hasOwn(o.attr,Ie))throw new K(`node '${s}': the attribute '${Ie}' is reserved for the Bag class name`);let h=Pn(ft(o.attr));p!==null&&(h[Ie]=p);let m=o.nodeTag;t?(yield[l.length?n[c]:null,o.label,m,f,h],d instanceof r&&(n[u]=a,e[a]=s,a++)):yield[l,o.label,m,f,h]}}toTytx(e="json",t=!1){let n=this._toTytxPayload(t),a=this.constructor.tytxSuffix;if(e==="json")return`${n}::${a}`;if(e==="msgpack")return on(new Ne(4,new TextEncoder().encode(`${a}:${n}`)));throw new TypeError(`Unsupported transport: ${e}`)}_toTytxPayload(e=!1){let t;if(e){let i={};t={rows:[...this._nodeFlattener(i)],paths:i}}else t={rows:[...this._nodeFlattener(null)]};let n=this.constructor,a=Ja(n,Kt(null,n.tytxSuffix));return a!==null&&(t[Ie]=a),t.rows=t.rows.map(([i,s,o,l,u])=>[ft(i),ft(s),ft(o),l,u]),t.paths&&(t.paths=ft(t.paths)),Ee(t)}static fromTytx(e,t="json",n={}){if(Qt(t)&&(n=t,t="json"),Ka(n),typeof e!="string"&&!(e instanceof Uint8Array))throw new TypeError("fromTytx requires serialized text or bytes");if(t!=="json"&&t!=="msgpack")throw new TypeError(`Unsupported transport: ${t}`);t==="json"&&e instanceof Uint8Array&&(e=new TextDecoder().decode(e));let a=ie(e,t==="json"?null:t);if(a instanceof r)return a;if(!Qt(a)&&!Array.isArray(a))throw new TypeError("fromTytx requires a dictionary, array or typed Bag root");return new this(a,n)}static _fromTytxPayload(e){let t=this.tytxSuffix;if(e==="")return new(Kt(null,t));let n=ie(e);if(!n||!Array.isArray(n.rows))throw new K("Invalid TYTX Bag: expected rows");let a=n.paths,i=a!=null,s=Object.hasOwn(n,Ie)?Za(t,n[Ie]):Kt(null,t),o=new s,l=new Map([["[]",o]]);for(let u of n.rows){if(!Array.isArray(u)||u.length!==5)throw new K("Invalid TYTX Bag row");let[c,d,f,p,h]=u,m=c??"";if(i){if(c!==null&&!Object.hasOwn(a,c))throw new K(`Unknown TYTX parent reference: ${c}`);m=c===null?"":a[c]}if(typeof m=="string"&&(m=m?m.split("."):[]),!Array.isArray(m))throw new K("Invalid TYTX parent path");let g=JSON.stringify(m);if(!l.has(g))throw new K(`Missing or undecodable TYTX parent branch: ${m}`);let b=l.get(g),y=JSON.stringify([...m,d]),v=p,w=Ln(v),D=Ya(h),A=Object.hasOwn(D,Ie)?D[Ie]:null;if(delete D[Ie],v instanceof r){let R=v.constructor.tytxSuffix,z=A!==null?Za(R,A):Kt(b.constructor,R);v=new z,l.set(y,v)}else if(A!==null)throw new K(`node '${y}': the attribute '${Ie}' is reserved for the Bag class name of a branch`);let $=b._appendLiteral(d,w?null:v,D,w);$.nodeTag=f??null}return o}toXml(e={}){let{pretty:t=!1,encoding:n="UTF-8",docHeader:a=null,selfClosedTags:i=null}=e,s=this._bagToXml(i,t);return a===!0?s=`<?xml version='1.0' encoding='${n}'?>
|
|
16
|
-
${s}`:typeof
|
|
17
|
-
${s}`),s}_bagToXml(e=null,t=!1,n=0){let
|
|
18
|
-
`:"")}_nodeToXml(e,t=null,n=!1,
|
|
15
|
+
*/var St=9e15,nt=1e9,ni="0123456789abcdef",Jr="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",Kr="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",ii={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-St,maxE:St,crypto:!1},Aa,ze,N=!0,en="[DecimalError] ",rt=en+"Invalid argument: ",Da=en+"Precision limit exceeded",Ta=en+"crypto unavailable",Ca="[object Decimal]",fe=Math.floor,re=Math.pow,wl=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,yl=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,vl=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,Na=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Ne=1e7,T=7,xl=9007199254740991,El=Jr.length-1,ai=Kr.length-1,_={toStringTag:Ca};_.absoluteValue=_.abs=function(){var r=new this.constructor(this);return r.s<0&&(r.s=1),k(r)};_.ceil=function(){return k(new this.constructor(this),this.e+1,2)};_.clampedTo=_.clamp=function(r,e){var t,n=this,i=n.constructor;if(r=new i(r),e=new i(e),!r.s||!e.s)return new i(NaN);if(r.gt(e))throw Error(rt+e);return t=n.cmp(r),t<0?r:n.cmp(e)>0?e:new i(n)};_.comparedTo=_.cmp=function(r){var e,t,n,i,a=this,s=a.d,o=(r=new a.constructor(r)).d,l=a.s,u=r.s;if(!s||!o)return!l||!u?NaN:l!==u?l:s===o?0:!s^l<0?1:-1;if(!s[0]||!o[0])return s[0]?l:o[0]?-u:0;if(l!==u)return l;if(a.e!==r.e)return a.e>r.e^l<0?1:-1;for(n=s.length,i=o.length,e=0,t=n<i?n:i;e<t;++e)if(s[e]!==o[e])return s[e]>o[e]^l<0?1:-1;return n===i?0:n>i^l<0?1:-1};_.cosine=_.cos=function(){var r,e,t=this,n=t.constructor;return t.d?t.d[0]?(r=n.precision,e=n.rounding,n.precision=r+Math.max(t.e,t.sd())+T,n.rounding=1,t=kl(n,Ma(n,t)),n.precision=r,n.rounding=e,k(ze==2||ze==3?t.neg():t,r,e,!0)):new n(1):new n(NaN)};_.cubeRoot=_.cbrt=function(){var r,e,t,n,i,a,s,o,l,u,c=this,d=c.constructor;if(!c.isFinite()||c.isZero())return new d(c);for(N=!1,a=c.s*re(c.s*c,1/3),!a||Math.abs(a)==1/0?(t=ue(c.d),r=c.e,(a=(r-t.length+1)%3)&&(t+=a==1||a==-2?"0":"00"),a=re(t,1/3),r=fe((r+1)/3)-(r%3==(r<0?-1:2)),a==1/0?t="5e"+r:(t=a.toExponential(),t=t.slice(0,t.indexOf("e")+1)+r),n=new d(t),n.s=c.s):n=new d(a.toString()),s=(r=d.precision)+3;;)if(o=n,l=o.times(o).times(o),u=l.plus(c),n=W(u.plus(c).times(o),u.plus(l),s+2,1),ue(o.d).slice(0,s)===(t=ue(n.d)).slice(0,s))if(t=t.slice(s-3,s+1),t=="9999"||!i&&t=="4999"){if(!i&&(k(o,r+1,0),o.times(o).times(o).eq(c))){n=o;break}s+=4,i=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(k(n,r+1,1),e=!n.times(n).times(n).eq(c));break}return N=!0,k(n,r,d.rounding,e)};_.decimalPlaces=_.dp=function(){var r,e=this.d,t=NaN;if(e){if(r=e.length-1,t=(r-fe(this.e/T))*T,r=e[r],r)for(;r%10==0;r/=10)t--;t<0&&(t=0)}return t};_.dividedBy=_.div=function(r){return W(this,new this.constructor(r))};_.dividedToIntegerBy=_.divToInt=function(r){var e=this,t=e.constructor;return k(W(e,new t(r),0,1,1),t.precision,t.rounding)};_.equals=_.eq=function(r){return this.cmp(r)===0};_.floor=function(){return k(new this.constructor(this),this.e+1,3)};_.greaterThan=_.gt=function(r){return this.cmp(r)>0};_.greaterThanOrEqualTo=_.gte=function(r){var e=this.cmp(r);return e==1||e===0};_.hyperbolicCosine=_.cosh=function(){var r,e,t,n,i,a=this,s=a.constructor,o=new s(1);if(!a.isFinite())return new s(a.s?1/0:NaN);if(a.isZero())return o;t=s.precision,n=s.rounding,s.precision=t+Math.max(a.e,a.sd())+4,s.rounding=1,i=a.d.length,i<32?(r=Math.ceil(i/3),e=(1/rn(4,r)).toString()):(r=16,e="2.3283064365386962890625e-10"),a=It(s,1,a.times(e),new s(1),!0);for(var l,u=r,c=new s(8);u--;)l=a.times(a),a=o.minus(l.times(c.minus(l.times(c))));return k(a,s.precision=t,s.rounding=n,!0)};_.hyperbolicSine=_.sinh=function(){var r,e,t,n,i=this,a=i.constructor;if(!i.isFinite()||i.isZero())return new a(i);if(e=a.precision,t=a.rounding,a.precision=e+Math.max(i.e,i.sd())+4,a.rounding=1,n=i.d.length,n<3)i=It(a,2,i,i,!0);else{r=1.4*Math.sqrt(n),r=r>16?16:r|0,i=i.times(1/rn(5,r)),i=It(a,2,i,i,!0);for(var s,o=new a(5),l=new a(16),u=new a(20);r--;)s=i.times(i),i=i.times(o.plus(s.times(l.times(s).plus(u))))}return a.precision=e,a.rounding=t,k(i,e,t,!0)};_.hyperbolicTangent=_.tanh=function(){var r,e,t=this,n=t.constructor;return t.isFinite()?t.isZero()?new n(t):(r=n.precision,e=n.rounding,n.precision=r+7,n.rounding=1,W(t.sinh(),t.cosh(),n.precision=r,n.rounding=e)):new n(t.s)};_.inverseCosine=_.acos=function(){var r=this,e=r.constructor,t=r.abs().cmp(1),n=e.precision,i=e.rounding;return t!==-1?t===0?r.isNeg()?Oe(e,n,i):new e(0):new e(NaN):r.isZero()?Oe(e,n+4,i).times(.5):(e.precision=n+6,e.rounding=1,r=new e(1).minus(r).div(r.plus(1)).sqrt().atan(),e.precision=n,e.rounding=i,r.times(2))};_.inverseHyperbolicCosine=_.acosh=function(){var r,e,t=this,n=t.constructor;return t.lte(1)?new n(t.eq(1)?0:NaN):t.isFinite()?(r=n.precision,e=n.rounding,n.precision=r+Math.max(Math.abs(t.e),t.sd())+4,n.rounding=1,N=!1,t=t.times(t).minus(1).sqrt().plus(t),N=!0,n.precision=r,n.rounding=e,t.ln()):new n(t)};_.inverseHyperbolicSine=_.asinh=function(){var r,e,t=this,n=t.constructor;return!t.isFinite()||t.isZero()?new n(t):(r=n.precision,e=n.rounding,n.precision=r+2*Math.max(Math.abs(t.e),t.sd())+6,n.rounding=1,N=!1,t=t.times(t).plus(1).sqrt().plus(t),N=!0,n.precision=r,n.rounding=e,t.ln())};_.inverseHyperbolicTangent=_.atanh=function(){var r,e,t,n,i=this,a=i.constructor;return i.isFinite()?i.e>=0?new a(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(r=a.precision,e=a.rounding,n=i.sd(),Math.max(n,r)<2*-i.e-1?k(new a(i),r,e,!0):(a.precision=t=n-i.e,i=W(i.plus(1),new a(1).minus(i),t+r,1),a.precision=r+4,a.rounding=1,i=i.ln(),a.precision=r,a.rounding=e,i.times(.5))):new a(NaN)};_.inverseSine=_.asin=function(){var r,e,t,n,i=this,a=i.constructor;return i.isZero()?new a(i):(e=i.abs().cmp(1),t=a.precision,n=a.rounding,e!==-1?e===0?(r=Oe(a,t+4,n).times(.5),r.s=i.s,r):new a(NaN):(a.precision=t+6,a.rounding=1,i=i.div(new a(1).minus(i.times(i)).sqrt().plus(1)).atan(),a.precision=t,a.rounding=n,i.times(2)))};_.inverseTangent=_.atan=function(){var r,e,t,n,i,a,s,o,l,u=this,c=u.constructor,d=c.precision,f=c.rounding;if(u.isFinite()){if(u.isZero())return new c(u);if(u.abs().eq(1)&&d+4<=ai)return s=Oe(c,d+4,f).times(.25),s.s=u.s,s}else{if(!u.s)return new c(NaN);if(d+4<=ai)return s=Oe(c,d+4,f).times(.5),s.s=u.s,s}for(c.precision=o=d+10,c.rounding=1,t=Math.min(28,o/T+2|0),r=t;r;--r)u=u.div(u.times(u).plus(1).sqrt().plus(1));for(N=!1,e=Math.ceil(o/T),n=1,l=u.times(u),s=new c(u),i=u;r!==-1;)if(i=i.times(l),a=s.minus(i.div(n+=2)),i=i.times(l),s=a.plus(i.div(n+=2)),s.d[e]!==void 0)for(r=e;s.d[r]===a.d[r]&&r--;);return t&&(s=s.times(2<<t-1)),N=!0,k(s,c.precision=d,c.rounding=f,!0)};_.isFinite=function(){return!!this.d};_.isInteger=_.isInt=function(){return!!this.d&&fe(this.e/T)>this.d.length-2};_.isNaN=function(){return!this.s};_.isNegative=_.isNeg=function(){return this.s<0};_.isPositive=_.isPos=function(){return this.s>0};_.isZero=function(){return!!this.d&&this.d[0]===0};_.lessThan=_.lt=function(r){return this.cmp(r)<0};_.lessThanOrEqualTo=_.lte=function(r){return this.cmp(r)<1};_.logarithm=_.log=function(r){var e,t,n,i,a,s,o,l,u=this,c=u.constructor,d=c.precision,f=c.rounding,p=5;if(r==null)r=new c(10),e=!0;else{if(r=new c(r),t=r.d,r.s<0||!t||!t[0]||r.eq(1))return new c(NaN);e=r.eq(10)}if(t=u.d,u.s<0||!t||!t[0]||u.eq(1))return new c(t&&!t[0]?-1/0:u.s!=1?NaN:t?0:1/0);if(e)if(t.length>1)a=!0;else{for(i=t[0];i%10===0;)i/=10;a=i!==1}if(N=!1,o=d+p,s=tt(u,o),n=e?Qr(c,o+10):tt(r,o),l=W(s,n,o,1),ir(l.d,i=d,f))do if(o+=10,s=tt(u,o),n=e?Qr(c,o+10):tt(r,o),l=W(s,n,o,1),!a){+ue(l.d).slice(i+1,i+15)+1==1e14&&(l=k(l,d+1,0));break}while(ir(l.d,i+=10,f));return N=!0,k(l,d,f)};_.minus=_.sub=function(r){var e,t,n,i,a,s,o,l,u,c,d,f,p=this,h=p.constructor;if(r=new h(r),!p.d||!r.d)return!p.s||!r.s?r=new h(NaN):p.d?r.s=-r.s:r=new h(r.d||p.s!==r.s?p:NaN),r;if(p.s!=r.s)return r.s=-r.s,p.plus(r);if(u=p.d,f=r.d,o=h.precision,l=h.rounding,!u[0]||!f[0]){if(f[0])r.s=-r.s;else if(u[0])r=new h(p);else return new h(l===3?-0:0);return N?k(r,o,l):r}if(t=fe(r.e/T),c=fe(p.e/T),u=u.slice(),a=c-t,a){for(d=a<0,d?(e=u,a=-a,s=f.length):(e=f,t=c,s=u.length),n=Math.max(Math.ceil(o/T),s)+2,a>n&&(a=n,e.length=1),e.reverse(),n=a;n--;)e.push(0);e.reverse()}else{for(n=u.length,s=f.length,d=n<s,d&&(s=n),n=0;n<s;n++)if(u[n]!=f[n]){d=u[n]<f[n];break}a=0}for(d&&(e=u,u=f,f=e,r.s=-r.s),s=u.length,n=f.length-s;n>0;--n)u[s++]=0;for(n=f.length;n>a;){if(u[--n]<f[n]){for(i=n;i&&u[--i]===0;)u[i]=Ne-1;--u[i],u[n]+=Ne}u[n]-=f[n]}for(;u[--s]===0;)u.pop();for(;u[0]===0;u.shift())--t;return u[0]?(r.d=u,r.e=tn(u,t),N?k(r,o,l):r):new h(l===3?-0:0)};_.modulo=_.mod=function(r){var e,t=this,n=t.constructor;return r=new n(r),!t.d||!r.s||r.d&&!r.d[0]?new n(NaN):!r.d||t.d&&!t.d[0]?k(new n(t),n.precision,n.rounding):(N=!1,n.modulo==9?(e=W(t,r.abs(),0,3,1),e.s*=r.s):e=W(t,r,0,n.modulo,1),e=e.times(r),N=!0,t.minus(e))};_.naturalExponential=_.exp=function(){return si(this)};_.naturalLogarithm=_.ln=function(){return tt(this)};_.negated=_.neg=function(){var r=new this.constructor(this);return r.s=-r.s,k(r)};_.plus=_.add=function(r){var e,t,n,i,a,s,o,l,u,c,d=this,f=d.constructor;if(r=new f(r),!d.d||!r.d)return!d.s||!r.s?r=new f(NaN):d.d||(r=new f(r.d||d.s===r.s?d:NaN)),r;if(d.s!=r.s)return r.s=-r.s,d.minus(r);if(u=d.d,c=r.d,o=f.precision,l=f.rounding,!u[0]||!c[0])return c[0]||(r=new f(d)),N?k(r,o,l):r;if(a=fe(d.e/T),n=fe(r.e/T),u=u.slice(),i=a-n,i){for(i<0?(t=u,i=-i,s=c.length):(t=c,n=a,s=u.length),a=Math.ceil(o/T),s=a>s?a+1:s+1,i>s&&(i=s,t.length=1),t.reverse();i--;)t.push(0);t.reverse()}for(s=u.length,i=c.length,s-i<0&&(i=s,t=c,c=u,u=t),e=0;i;)e=(u[--i]=u[i]+c[i]+e)/Ne|0,u[i]%=Ne;for(e&&(u.unshift(e),++n),s=u.length;u[--s]==0;)u.pop();return r.d=u,r.e=tn(u,n),N?k(r,o,l):r};_.precision=_.sd=function(r){var e,t=this;if(r!==void 0&&r!==!!r&&r!==1&&r!==0)throw Error(rt+r);return t.d?(e=Sa(t.d),r&&t.e+1>e&&(e=t.e+1)):e=NaN,e};_.round=function(){var r=this,e=r.constructor;return k(new e(r),r.e+1,e.rounding)};_.sine=_.sin=function(){var r,e,t=this,n=t.constructor;return t.isFinite()?t.isZero()?new n(t):(r=n.precision,e=n.rounding,n.precision=r+Math.max(t.e,t.sd())+T,n.rounding=1,t=Dl(n,Ma(n,t)),n.precision=r,n.rounding=e,k(ze>2?t.neg():t,r,e,!0)):new n(NaN)};_.squareRoot=_.sqrt=function(){var r,e,t,n,i,a,s=this,o=s.d,l=s.e,u=s.s,c=s.constructor;if(u!==1||!o||!o[0])return new c(!u||u<0&&(!o||o[0])?NaN:o?s:1/0);for(N=!1,u=Math.sqrt(+s),u==0||u==1/0?(e=ue(o),(e.length+l)%2==0&&(e+="0"),u=Math.sqrt(e),l=fe((l+1)/2)-(l<0||l%2),u==1/0?e="5e"+l:(e=u.toExponential(),e=e.slice(0,e.indexOf("e")+1)+l),n=new c(e)):n=new c(u.toString()),t=(l=c.precision)+3;;)if(a=n,n=a.plus(W(s,a,t+2,1)).times(.5),ue(a.d).slice(0,t)===(e=ue(n.d)).slice(0,t))if(e=e.slice(t-3,t+1),e=="9999"||!i&&e=="4999"){if(!i&&(k(a,l+1,0),a.times(a).eq(s))){n=a;break}t+=4,i=1}else{(!+e||!+e.slice(1)&&e.charAt(0)=="5")&&(k(n,l+1,1),r=!n.times(n).eq(s));break}return N=!0,k(n,l,c.rounding,r)};_.tangent=_.tan=function(){var r,e,t=this,n=t.constructor;return t.isFinite()?t.isZero()?new n(t):(r=n.precision,e=n.rounding,n.precision=r+10,n.rounding=1,t=t.sin(),t.s=1,t=W(t,new n(1).minus(t.times(t)).sqrt(),r+10,0),n.precision=r,n.rounding=e,k(ze==2||ze==4?t.neg():t,r,e,!0)):new n(NaN)};_.times=_.mul=function(r){var e,t,n,i,a,s,o,l,u,c=this,d=c.constructor,f=c.d,p=(r=new d(r)).d;if(r.s*=c.s,!f||!f[0]||!p||!p[0])return new d(!r.s||f&&!f[0]&&!p||p&&!p[0]&&!f?NaN:!f||!p?r.s/0:r.s*0);for(t=fe(c.e/T)+fe(r.e/T),l=f.length,u=p.length,l<u&&(a=f,f=p,p=a,s=l,l=u,u=s),a=[],s=l+u,n=s;n--;)a.push(0);for(n=u;--n>=0;){for(e=0,i=l+n;i>n;)o=a[i]+p[n]*f[i-n-1]+e,a[i--]=o%Ne|0,e=o/Ne|0;a[i]=(a[i]+e)%Ne|0}for(;!a[--s];)a.pop();return e?++t:a.shift(),r.d=a,r.e=tn(a,t),N?k(r,d.precision,d.rounding):r};_.toBinary=function(r,e){return oi(this,2,r,e)};_.toDecimalPlaces=_.toDP=function(r,e){var t=this,n=t.constructor;return t=new n(t),r===void 0?t:(be(r,0,nt),e===void 0?e=n.rounding:be(e,0,8),k(t,r+t.e+1,e))};_.toExponential=function(r,e){var t,n=this,i=n.constructor;return r===void 0?t=Me(n,!0):(be(r,0,nt),e===void 0?e=i.rounding:be(e,0,8),n=k(new i(n),r+1,e),t=Me(n,!0,r+1)),n.isNeg()&&!n.isZero()?"-"+t:t};_.toFixed=function(r,e){var t,n,i=this,a=i.constructor;return r===void 0?t=Me(i):(be(r,0,nt),e===void 0?e=a.rounding:be(e,0,8),n=k(new a(i),r+i.e+1,e),t=Me(n,!1,r+n.e+1)),i.isNeg()&&!i.isZero()?"-"+t:t};_.toFraction=function(r){var e,t,n,i,a,s,o,l,u,c,d,f,p=this,h=p.d,m=p.constructor;if(!h)return new m(p);if(u=t=new m(1),n=l=new m(0),e=new m(n),a=e.e=Sa(h)-p.e-1,s=a%T,e.d[0]=re(10,s<0?T+s:s),r==null)r=a>0?e:u;else{if(o=new m(r),!o.isInt()||o.lt(u))throw Error(rt+o);r=o.gt(e)?a>0?e:u:o}for(N=!1,o=new m(ue(h)),c=m.precision,m.precision=a=h.length*T*2;d=W(o,e,0,1,1),i=t.plus(d.times(n)),i.cmp(r)!=1;)t=n,n=i,i=u,u=l.plus(d.times(i)),l=i,i=e,e=o.minus(d.times(i)),o=i;return i=W(r.minus(t),n,0,1,1),l=l.plus(i.times(u)),t=t.plus(i.times(n)),l.s=u.s=p.s,f=W(u,n,a,1).minus(p).abs().cmp(W(l,t,a,1).minus(p).abs())<1?[u,n]:[l,t],m.precision=c,N=!0,f};_.toHexadecimal=_.toHex=function(r,e){return oi(this,16,r,e)};_.toNearest=function(r,e){var t=this,n=t.constructor;if(t=new n(t),r==null){if(!t.d)return t;r=new n(1),e=n.rounding}else{if(r=new n(r),e===void 0?e=n.rounding:be(e,0,8),!t.d)return r.s?t:r;if(!r.d)return r.s&&(r.s=t.s),r}return r.d[0]?(N=!1,t=W(t,r,0,e,1).times(r),N=!0,k(t)):(r.s=t.s,t=r),t};_.toNumber=function(){return+this};_.toOctal=function(r,e){return oi(this,8,r,e)};_.toPower=_.pow=function(r){var e,t,n,i,a,s,o=this,l=o.constructor,u=+(r=new l(r));if(!o.d||!r.d||!o.d[0]||!r.d[0])return new l(re(+o,u));if(o=new l(o),o.eq(1))return o;if(n=l.precision,a=l.rounding,r.eq(1))return k(o,n,a);if(e=fe(r.e/T),e>=r.d.length-1&&(t=u<0?-u:u)<=xl)return i=Ia(l,o,t,n),r.s<0?new l(1).div(i):k(i,n,a);if(s=o.s,s<0){if(e<r.d.length-1)return new l(NaN);if((r.d[e]&1)==0&&(s=1),o.e==0&&o.d[0]==1&&o.d.length==1)return o.s=s,o}return t=re(+o,u),e=t==0||!isFinite(t)?fe(u*(Math.log("0."+ue(o.d))/Math.LN10+o.e+1)):new l(t+"").e,e>l.maxE+1||e<l.minE-1?new l(e>0?s/0:0):(N=!1,l.rounding=o.s=1,t=Math.min(12,(e+"").length),i=si(r.times(tt(o,n+t)),n),i.d&&(i=k(i,n+5,1),ir(i.d,n,a)&&(e=n+10,i=k(si(r.times(tt(o,e+t)),e),e+5,1),+ue(i.d).slice(n+1,n+15)+1==1e14&&(i=k(i,n+1,0)))),i.s=s,N=!0,l.rounding=a,k(i,n,a))};_.toPrecision=function(r,e){var t,n=this,i=n.constructor;return r===void 0?t=Me(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(be(r,1,nt),e===void 0?e=i.rounding:be(e,0,8),n=k(new i(n),r,e),t=Me(n,r<=n.e||n.e<=i.toExpNeg,r)),n.isNeg()&&!n.isZero()?"-"+t:t};_.toSignificantDigits=_.toSD=function(r,e){var t=this,n=t.constructor;return r===void 0?(r=n.precision,e=n.rounding):(be(r,1,nt),e===void 0?e=n.rounding:be(e,0,8)),k(new n(t),r,e)};_.toString=function(){var r=this,e=r.constructor,t=Me(r,r.e<=e.toExpNeg||r.e>=e.toExpPos);return r.isNeg()&&!r.isZero()?"-"+t:t};_.truncated=_.trunc=function(){return k(new this.constructor(this),this.e+1,1)};_.valueOf=_.toJSON=function(){var r=this,e=r.constructor,t=Me(r,r.e<=e.toExpNeg||r.e>=e.toExpPos);return r.isNeg()?"-"+t:t};function ue(r){var e,t,n,i=r.length-1,a="",s=r[0];if(i>0){for(a+=s,e=1;e<i;e++)n=r[e]+"",t=T-n.length,t&&(a+=et(t)),a+=n;s=r[e],n=s+"",t=T-n.length,t&&(a+=et(t))}else if(s===0)return"0";for(;s%10===0;)s/=10;return a+s}function be(r,e,t){if(r!==~~r||r<e||r>t)throw Error(rt+r)}function ir(r,e,t,n){var i,a,s,o;for(a=r[0];a>=10;a/=10)--e;return--e<0?(e+=T,i=0):(i=Math.ceil((e+1)/T),e%=T),a=re(10,T-e),o=r[i]%a|0,n==null?e<3?(e==0?o=o/100|0:e==1&&(o=o/10|0),s=t<4&&o==99999||t>3&&o==49999||o==5e4||o==0):s=(t<4&&o+1==a||t>3&&o+1==a/2)&&(r[i+1]/a/100|0)==re(10,e-2)-1||(o==a/2||o==0)&&(r[i+1]/a/100|0)==0:e<4?(e==0?o=o/1e3|0:e==1?o=o/100|0:e==2&&(o=o/10|0),s=(n||t<4)&&o==9999||!n&&t>3&&o==4999):s=((n||t<4)&&o+1==a||!n&&t>3&&o+1==a/2)&&(r[i+1]/a/1e3|0)==re(10,e-3)-1,s}function Yr(r,e,t){for(var n,i=[0],a,s=0,o=r.length;s<o;){for(a=i.length;a--;)i[a]*=e;for(i[0]+=ni.indexOf(r.charAt(s++)),n=0;n<i.length;n++)i[n]>t-1&&(i[n+1]===void 0&&(i[n+1]=0),i[n+1]+=i[n]/t|0,i[n]%=t)}return i.reverse()}function kl(r,e){var t,n,i;if(e.isZero())return e;n=e.d.length,n<32?(t=Math.ceil(n/3),i=(1/rn(4,t)).toString()):(t=16,i="2.3283064365386962890625e-10"),r.precision+=t,e=It(r,1,e.times(i),new r(1));for(var a=t;a--;){var s=e.times(e);e=s.times(s).minus(s).times(8).plus(1)}return r.precision-=t,e}var W=(function(){function r(n,i,a){var s,o=0,l=n.length;for(n=n.slice();l--;)s=n[l]*i+o,n[l]=s%a|0,o=s/a|0;return o&&n.unshift(o),n}function e(n,i,a,s){var o,l;if(a!=s)l=a>s?1:-1;else for(o=l=0;o<a;o++)if(n[o]!=i[o]){l=n[o]>i[o]?1:-1;break}return l}function t(n,i,a,s){for(var o=0;a--;)n[a]-=o,o=n[a]<i[a]?1:0,n[a]=o*s+n[a]-i[a];for(;!n[0]&&n.length>1;)n.shift()}return function(n,i,a,s,o,l){var u,c,d,f,p,h,m,g,b,y,v,w,D,A,$,R,V,me,M,H,te=n.constructor,U=n.s==i.s?1:-1,Q=n.d,B=i.d;if(!Q||!Q[0]||!B||!B[0])return new te(!n.s||!i.s||(Q?B&&Q[0]==B[0]:!B)?NaN:Q&&Q[0]==0||!B?U*0:U/0);for(l?(p=1,c=n.e-i.e):(l=Ne,p=T,c=fe(n.e/p)-fe(i.e/p)),M=B.length,V=Q.length,b=new te(U),y=b.d=[],d=0;B[d]==(Q[d]||0);d++);if(B[d]>(Q[d]||0)&&c--,a==null?(A=a=te.precision,s=te.rounding):o?A=a+(n.e-i.e)+1:A=a,A<0)y.push(1),h=!0;else{if(A=A/p+2|0,d=0,M==1){for(f=0,B=B[0],A++;(d<V||f)&&A--;d++)$=f*l+(Q[d]||0),y[d]=$/B|0,f=$%B|0;h=f||d<V}else{for(f=l/(B[0]+1)|0,f>1&&(B=r(B,f,l),Q=r(Q,f,l),M=B.length,V=Q.length),R=M,v=Q.slice(0,M),w=v.length;w<M;)v[w++]=0;H=B.slice(),H.unshift(0),me=B[0],B[1]>=l/2&&++me;do f=0,u=e(B,v,M,w),u<0?(D=v[0],M!=w&&(D=D*l+(v[1]||0)),f=D/me|0,f>1?(f>=l&&(f=l-1),m=r(B,f,l),g=m.length,w=v.length,u=e(m,v,g,w),u==1&&(f--,t(m,M<g?H:B,g,l))):(f==0&&(u=f=1),m=B.slice()),g=m.length,g<w&&m.unshift(0),t(v,m,w,l),u==-1&&(w=v.length,u=e(B,v,M,w),u<1&&(f++,t(v,M<w?H:B,w,l))),w=v.length):u===0&&(f++,v=[0]),y[d++]=f,u&&v[0]?v[w++]=Q[R]||0:(v=[Q[R]],w=1);while((R++<V||v[0]!==void 0)&&A--);h=v[0]!==void 0}y[0]||y.shift()}if(p==1)b.e=c,Aa=h;else{for(d=1,f=y[0];f>=10;f/=10)d++;b.e=d+c*p-1,k(b,o?a+b.e+1:a,s,h)}return b}})();function k(r,e,t,n){var i,a,s,o,l,u,c,d,f,p=r.constructor;e:if(e!=null){if(d=r.d,!d)return r;for(i=1,o=d[0];o>=10;o/=10)i++;if(a=e-i,a<0)a+=T,s=e,c=d[f=0],l=c/re(10,i-s-1)%10|0;else if(f=Math.ceil((a+1)/T),o=d.length,f>=o)if(n){for(;o++<=f;)d.push(0);c=l=0,i=1,a%=T,s=a-T+1}else break e;else{for(c=o=d[f],i=1;o>=10;o/=10)i++;a%=T,s=a-T+i,l=s<0?0:c/re(10,i-s-1)%10|0}if(n=n||e<0||d[f+1]!==void 0||(s<0?c:c%re(10,i-s-1)),u=t<4?(l||n)&&(t==0||t==(r.s<0?3:2)):l>5||l==5&&(t==4||n||t==6&&(a>0?s>0?c/re(10,i-s):0:d[f-1])%10&1||t==(r.s<0?8:7)),e<1||!d[0])return d.length=0,u?(e-=r.e+1,d[0]=re(10,(T-e%T)%T),r.e=-e||0):d[0]=r.e=0,r;if(a==0?(d.length=f,o=1,f--):(d.length=f+1,o=re(10,T-a),d[f]=s>0?(c/re(10,i-s)%re(10,s)|0)*o:0),u)for(;;)if(f==0){for(a=1,s=d[0];s>=10;s/=10)a++;for(s=d[0]+=o,o=1;s>=10;s/=10)o++;a!=o&&(r.e++,d[0]==Ne&&(d[0]=1));break}else{if(d[f]+=o,d[f]!=Ne)break;d[f--]=0,o=1}for(a=d.length;d[--a]===0;)d.pop()}return N&&(r.e>p.maxE?(r.d=null,r.e=NaN):r.e<p.minE&&(r.e=0,r.d=[0])),r}function Me(r,e,t){if(!r.isFinite())return Oa(r);var n,i=r.e,a=ue(r.d),s=a.length;return e?(t&&(n=t-s)>0?a=a.charAt(0)+"."+a.slice(1)+et(n):s>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(r.e<0?"e":"e+")+r.e):i<0?(a="0."+et(-i-1)+a,t&&(n=t-s)>0&&(a+=et(n))):i>=s?(a+=et(i+1-s),t&&(n=t-i-1)>0&&(a=a+"."+et(n))):((n=i+1)<s&&(a=a.slice(0,n)+"."+a.slice(n)),t&&(n=t-s)>0&&(i+1===s&&(a+="."),a+=et(n))),a}function tn(r,e){var t=r[0];for(e*=T;t>=10;t/=10)e++;return e}function Qr(r,e,t){if(e>El)throw N=!0,t&&(r.precision=t),Error(Da);return k(new r(Jr),e,1,!0)}function Oe(r,e,t){if(e>ai)throw Error(Da);return k(new r(Kr),e,t,!0)}function Sa(r){var e=r.length-1,t=e*T+1;if(e=r[e],e){for(;e%10==0;e/=10)t--;for(e=r[0];e>=10;e/=10)t++}return t}function et(r){for(var e="";r--;)e+="0";return e}function Ia(r,e,t,n){var i,a=new r(1),s=Math.ceil(n/T+4);for(N=!1;;){if(t%2&&(a=a.times(e),Ea(a.d,s)&&(i=!0)),t=fe(t/2),t===0){t=a.d.length-1,i&&a.d[t]===0&&++a.d[t];break}e=e.times(e),Ea(e.d,s)}return N=!0,a}function xa(r){return r.d[r.d.length-1]&1}function Ba(r,e,t){for(var n,i,a=new r(e[0]),s=0;++s<e.length;){if(i=new r(e[s]),!i.s){a=i;break}n=a.cmp(i),(n===t||n===0&&a.s===t)&&(a=i)}return a}function si(r,e){var t,n,i,a,s,o,l,u=0,c=0,d=0,f=r.constructor,p=f.rounding,h=f.precision;if(!r.d||!r.d[0]||r.e>17)return new f(r.d?r.d[0]?r.s<0?0:1/0:1:r.s?r.s<0?0:r:NaN);for(e==null?(N=!1,l=h):l=e,o=new f(.03125);r.e>-2;)r=r.times(o),d+=5;for(n=Math.log(re(2,d))/Math.LN10*2+5|0,l+=n,t=a=s=new f(1),f.precision=l;;){if(a=k(a.times(r),l,1),t=t.times(++c),o=s.plus(W(a,t,l,1)),ue(o.d).slice(0,l)===ue(s.d).slice(0,l)){for(i=d;i--;)s=k(s.times(s),l,1);if(e==null)if(u<3&&ir(s.d,l-n,p,u))f.precision=l+=10,t=a=o=new f(1),c=0,u++;else return k(s,f.precision=h,p,N=!0);else return f.precision=h,s}s=o}}function tt(r,e){var t,n,i,a,s,o,l,u,c,d,f,p=1,h=10,m=r,g=m.d,b=m.constructor,y=b.rounding,v=b.precision;if(m.s<0||!g||!g[0]||!m.e&&g[0]==1&&g.length==1)return new b(g&&!g[0]?-1/0:m.s!=1?NaN:g?0:m);if(e==null?(N=!1,c=v):c=e,b.precision=c+=h,t=ue(g),n=t.charAt(0),Math.abs(a=m.e)<15e14){for(;n<7&&n!=1||n==1&&t.charAt(1)>3;)m=m.times(r),t=ue(m.d),n=t.charAt(0),p++;a=m.e,n>1?(m=new b("0."+t),a++):m=new b(n+"."+t.slice(1))}else return u=Qr(b,c+2,v).times(a+""),m=tt(new b(n+"."+t.slice(1)),c-h).plus(u),b.precision=v,e==null?k(m,v,y,N=!0):m;for(d=m,l=s=m=W(m.minus(1),m.plus(1),c,1),f=k(m.times(m),c,1),i=3;;){if(s=k(s.times(f),c,1),u=l.plus(W(s,new b(i),c,1)),ue(u.d).slice(0,c)===ue(l.d).slice(0,c))if(l=l.times(2),a!==0&&(l=l.plus(Qr(b,c+2,v).times(a+""))),l=W(l,new b(p),c,1),e==null)if(ir(l.d,c-h,y,o))b.precision=c+=h,u=s=m=W(d.minus(1),d.plus(1),c,1),f=k(m.times(m),c,1),i=o=1;else return k(l,b.precision=v,y,N=!0);else return b.precision=v,l;l=u,i+=2}}function Oa(r){return String(r.s*r.s/0)}function Zr(r,e){var t,n,i;for((t=e.indexOf("."))>-1&&(e=e.replace(".","")),(n=e.search(/e/i))>0?(t<0&&(t=n),t+=+e.slice(n+1),e=e.substring(0,n)):t<0&&(t=e.length),n=0;e.charCodeAt(n)===48;n++);for(i=e.length;e.charCodeAt(i-1)===48;--i);if(e=e.slice(n,i),e){if(i-=n,r.e=t=t-n-1,r.d=[],n=(t+1)%T,t<0&&(n+=T),n<i){for(n&&r.d.push(+e.slice(0,n)),i-=T;n<i;)r.d.push(+e.slice(n,n+=T));e=e.slice(n),n=T-e.length}else n-=i;for(;n--;)e+="0";r.d.push(+e),N&&(r.e>r.constructor.maxE?(r.d=null,r.e=NaN):r.e<r.constructor.minE&&(r.e=0,r.d=[0]))}else r.e=0,r.d=[0];return r}function Al(r,e){var t,n,i,a,s,o,l,u,c;if(e.indexOf("_")>-1){if(e=e.replace(/(\d)_(?=\d)/g,"$1"),Na.test(e))return Zr(r,e)}else if(e==="Infinity"||e==="NaN")return+e||(r.s=NaN),r.e=NaN,r.d=null,r;if(yl.test(e))t=16,e=e.toLowerCase();else if(wl.test(e))t=2;else if(vl.test(e))t=8;else throw Error(rt+e);for(a=e.search(/p/i),a>0?(l=+e.slice(a+1),e=e.substring(2,a)):e=e.slice(2),a=e.indexOf("."),s=a>=0,n=r.constructor,s&&(e=e.replace(".",""),o=e.length,a=o-a,i=Ia(n,new n(t),a,a*2)),u=Yr(e,t,Ne),c=u.length-1,a=c;u[a]===0;--a)u.pop();return a<0?new n(r.s*0):(r.e=tn(u,c),r.d=u,N=!1,s&&(r=W(r,i,o*4)),l&&(r=r.times(Math.abs(l)<54?re(2,l):ar.pow(2,l))),N=!0,r)}function Dl(r,e){var t,n=e.d.length;if(n<3)return e.isZero()?e:It(r,2,e,e);t=1.4*Math.sqrt(n),t=t>16?16:t|0,e=e.times(1/rn(5,t)),e=It(r,2,e,e);for(var i,a=new r(5),s=new r(16),o=new r(20);t--;)i=e.times(e),e=e.times(a.plus(i.times(s.times(i).minus(o))));return e}function It(r,e,t,n,i){var a,s,o,l,u=1,c=r.precision,d=Math.ceil(c/T);for(N=!1,l=t.times(t),o=new r(n);;){if(s=W(o.times(l),new r(e++*e++),c,1),o=i?n.plus(s):n.minus(s),n=W(s.times(l),new r(e++*e++),c,1),s=o.plus(n),s.d[d]!==void 0){for(a=d;s.d[a]===o.d[a]&&a--;);if(a==-1)break}a=o,o=n,n=s,s=a,u++}return N=!0,s.d.length=d+1,s}function rn(r,e){for(var t=r;--e;)t*=r;return t}function Ma(r,e){var t,n=e.s<0,i=Oe(r,r.precision,1),a=i.times(.5);if(e=e.abs(),e.lte(a))return ze=n?4:1,e;if(t=e.divToInt(i),t.isZero())ze=n?3:2;else{if(e=e.minus(t.times(i)),e.lte(a))return ze=xa(t)?n?2:3:n?4:1,e;ze=xa(t)?n?1:4:n?3:2}return e.minus(i).abs()}function oi(r,e,t,n){var i,a,s,o,l,u,c,d,f,p=r.constructor,h=t!==void 0;if(h?(be(t,1,nt),n===void 0?n=p.rounding:be(n,0,8)):(t=p.precision,n=p.rounding),!r.isFinite())c=Oa(r);else{for(c=Me(r),s=c.indexOf("."),h?(i=2,e==16?t=t*4-3:e==8&&(t=t*3-2)):i=e,s>=0&&(c=c.replace(".",""),f=new p(1),f.e=c.length-s,f.d=Yr(Me(f),10,i),f.e=f.d.length),d=Yr(c,10,i),a=l=d.length;d[--l]==0;)d.pop();if(!d[0])c=h?"0p+0":"0";else{if(s<0?a--:(r=new p(r),r.d=d,r.e=a,r=W(r,f,t,n,0,i),d=r.d,a=r.e,u=Aa),s=d[t],o=i/2,u=u||d[t+1]!==void 0,u=n<4?(s!==void 0||u)&&(n===0||n===(r.s<0?3:2)):s>o||s===o&&(n===4||u||n===6&&d[t-1]&1||n===(r.s<0?8:7)),d.length=t,u)for(;++d[--t]>i-1;)d[t]=0,t||(++a,d.unshift(1));for(l=d.length;!d[l-1];--l);for(s=0,c="";s<l;s++)c+=ni.charAt(d[s]);if(h){if(l>1)if(e==16||e==8){for(s=e==16?4:3,--l;l%s;l++)c+="0";for(d=Yr(c,i,e),l=d.length;!d[l-1];--l);for(s=1,c="1.";s<l;s++)c+=ni.charAt(d[s])}else c=c.charAt(0)+"."+c.slice(1);c=c+(a<0?"p":"p+")+a}else if(a<0){for(;++a;)c="0"+c;c="0."+c}else if(++a>l)for(a-=l;a--;)c+="0";else a<l&&(c=c.slice(0,a)+"."+c.slice(a))}c=(e==16?"0x":e==2?"0b":e==8?"0o":"")+c}return r.s<0?"-"+c:c}function Ea(r,e){if(r.length>e)return r.length=e,!0}function Tl(r){return new this(r).abs()}function Cl(r){return new this(r).acos()}function Nl(r){return new this(r).acosh()}function Sl(r,e){return new this(r).plus(e)}function Il(r){return new this(r).asin()}function Bl(r){return new this(r).asinh()}function Ol(r){return new this(r).atan()}function Ml(r){return new this(r).atanh()}function Rl(r,e){r=new this(r),e=new this(e);var t,n=this.precision,i=this.rounding,a=n+4;return!r.s||!e.s?t=new this(NaN):!r.d&&!e.d?(t=Oe(this,a,1).times(e.s>0?.25:.75),t.s=r.s):!e.d||r.isZero()?(t=e.s<0?Oe(this,n,i):new this(0),t.s=r.s):!r.d||e.isZero()?(t=Oe(this,a,1).times(.5),t.s=r.s):e.s<0?(this.precision=a,this.rounding=1,t=this.atan(W(r,e,a,1)),e=Oe(this,a,1),this.precision=n,this.rounding=i,t=r.s<0?t.minus(e):t.plus(e)):t=this.atan(W(r,e,a,1)),t}function Ll(r){return new this(r).cbrt()}function Pl(r){return k(r=new this(r),r.e+1,2)}function $l(r,e,t){return new this(r).clamp(e,t)}function Fl(r){if(!r||typeof r!="object")throw Error(en+"Object expected");var e,t,n,i=r.defaults===!0,a=["precision",1,nt,"rounding",0,8,"toExpNeg",-St,0,"toExpPos",0,St,"maxE",0,St,"minE",-St,0,"modulo",0,9];for(e=0;e<a.length;e+=3)if(t=a[e],i&&(this[t]=ii[t]),(n=r[t])!==void 0)if(fe(n)===n&&n>=a[e+1]&&n<=a[e+2])this[t]=n;else throw Error(rt+t+": "+n);if(t="crypto",i&&(this[t]=ii[t]),(n=r[t])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[t]=!0;else throw Error(Ta);else this[t]=!1;else throw Error(rt+t+": "+n);return this}function Ul(r){return new this(r).cos()}function ql(r){return new this(r).cosh()}function Ra(r){var e,t,n;function i(a){var s,o,l,u=this;if(!(u instanceof i))return new i(a);if(u.constructor=i,ka(a)){u.s=a.s,N?!a.d||a.e>i.maxE?(u.e=NaN,u.d=null):a.e<i.minE?(u.e=0,u.d=[0]):(u.e=a.e,u.d=a.d.slice()):(u.e=a.e,u.d=a.d?a.d.slice():a.d);return}if(l=typeof a,l==="number"){if(a===0){u.s=1/a<0?-1:1,u.e=0,u.d=[0];return}if(a<0?(a=-a,u.s=-1):u.s=1,a===~~a&&a<1e7){for(s=0,o=a;o>=10;o/=10)s++;N?s>i.maxE?(u.e=NaN,u.d=null):s<i.minE?(u.e=0,u.d=[0]):(u.e=s,u.d=[a]):(u.e=s,u.d=[a]);return}if(a*0!==0){a||(u.s=NaN),u.e=NaN,u.d=null;return}return Zr(u,a.toString())}if(l==="string")return(o=a.charCodeAt(0))===45?(a=a.slice(1),u.s=-1):(o===43&&(a=a.slice(1)),u.s=1),Na.test(a)?Zr(u,a):Al(u,a);if(l==="bigint")return a<0?(a=-a,u.s=-1):u.s=1,Zr(u,a.toString());throw Error(rt+a)}if(i.prototype=_,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.EUCLID=9,i.config=i.set=Fl,i.clone=Ra,i.isDecimal=ka,i.abs=Tl,i.acos=Cl,i.acosh=Nl,i.add=Sl,i.asin=Il,i.asinh=Bl,i.atan=Ol,i.atanh=Ml,i.atan2=Rl,i.cbrt=Ll,i.ceil=Pl,i.clamp=$l,i.cos=Ul,i.cosh=ql,i.div=jl,i.exp=zl,i.floor=Vl,i.hypot=Hl,i.ln=Wl,i.log=Gl,i.log10=Yl,i.log2=Xl,i.max=Zl,i.min=Jl,i.mod=Kl,i.mul=Ql,i.pow=eu,i.random=tu,i.round=ru,i.sign=nu,i.sin=iu,i.sinh=au,i.sqrt=su,i.sub=ou,i.sum=lu,i.tan=uu,i.tanh=cu,i.trunc=du,r===void 0&&(r={}),r&&r.defaults!==!0)for(n=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],e=0;e<n.length;)r.hasOwnProperty(t=n[e++])||(r[t]=this[t]);return i.config(r),i}function jl(r,e){return new this(r).div(e)}function zl(r){return new this(r).exp()}function Vl(r){return k(r=new this(r),r.e+1,3)}function Hl(){var r,e,t=new this(0);for(N=!1,r=0;r<arguments.length;)if(e=new this(arguments[r++]),e.d)t.d&&(t=t.plus(e.times(e)));else{if(e.s)return N=!0,new this(1/0);t=e}return N=!0,t.sqrt()}function ka(r){return r instanceof ar||r&&r.toStringTag===Ca||!1}function Wl(r){return new this(r).ln()}function Gl(r,e){return new this(r).log(e)}function Xl(r){return new this(r).log(2)}function Yl(r){return new this(r).log(10)}function Zl(){return Ba(this,arguments,-1)}function Jl(){return Ba(this,arguments,1)}function Kl(r,e){return new this(r).mod(e)}function Ql(r,e){return new this(r).mul(e)}function eu(r,e){return new this(r).pow(e)}function tu(r){var e,t,n,i,a=0,s=new this(1),o=[];if(r===void 0?r=this.precision:be(r,1,nt),n=Math.ceil(r/T),this.crypto)if(crypto.getRandomValues)for(e=crypto.getRandomValues(new Uint32Array(n));a<n;)i=e[a],i>=429e7?e[a]=crypto.getRandomValues(new Uint32Array(1))[0]:o[a++]=i%1e7;else if(crypto.randomBytes){for(e=crypto.randomBytes(n*=4);a<n;)i=e[a]+(e[a+1]<<8)+(e[a+2]<<16)+((e[a+3]&127)<<24),i>=214e7?crypto.randomBytes(4).copy(e,a):(o.push(i%1e7),a+=4);a=n/4}else throw Error(Ta);else for(;a<n;)o[a++]=Math.random()*1e7|0;for(n=o[--a],r%=T,n&&r&&(i=re(10,T-r),o[a]=(n/i|0)*i);o[a]===0;a--)o.pop();if(a<0)t=0,o=[0];else{for(t=-1;o[0]===0;t-=T)o.shift();for(n=1,i=o[0];i>=10;i/=10)n++;n<T&&(t-=T-n)}return s.e=t,s.d=o,s}function ru(r){return k(r=new this(r),r.e+1,this.rounding)}function nu(r){return r=new this(r),r.d?r.d[0]?r.s:0*r.s:r.s||NaN}function iu(r){return new this(r).sin()}function au(r){return new this(r).sinh()}function su(r){return new this(r).sqrt()}function ou(r,e){return new this(r).sub(e)}function lu(){var r=0,e=arguments,t=new this(e[r]);for(N=!1;t.s&&++r<e.length;)t=t.plus(e[r]);return N=!0,k(t,this.precision,this.rounding)}function uu(r){return new this(r).tan()}function cu(r){return new this(r).tanh()}function du(r){return k(r=new this(r),r.e+1,1)}_[Symbol.for("nodejs.util.inspect.custom")]=_.toString;_[Symbol.toStringTag]="Decimal";var ar=_.constructor=Ra(ii);Jr=new ar(Jr);Kr=new ar(Kr);var La=ar;var fu=20,pu=1,ht=1e6,Pa=1e6,hu=-7,mu=21,gu=!1,sr="[big.js] ",mt=sr+"Invalid ",nn=mt+"decimal places",bu=mt+"rounding mode",$a=sr+"Division by zero",j={},Re=void 0,_u=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;function Fa(){function r(e){var t=this;if(!(t instanceof r))return e===Re?Fa():new r(e);if(e instanceof r)t.s=e.s,t.e=e.e,t.c=e.c.slice();else{if(typeof e!="string"){if(r.strict===!0&&typeof e!="bigint")throw TypeError(mt+"value");e=e===0&&1/e<0?"-0":String(e)}wu(t,e)}t.constructor=r}return r.prototype=j,r.DP=fu,r.RM=pu,r.NE=hu,r.PE=mu,r.strict=gu,r.roundDown=0,r.roundHalfUp=1,r.roundHalfEven=2,r.roundUp=3,r}function wu(r,e){var t,n,i;if(!_u.test(e))throw Error(mt+"number");for(r.s=e.charAt(0)=="-"?(e=e.slice(1),-1):1,(t=e.indexOf("."))>-1&&(e=e.replace(".","")),(n=e.search(/e/i))>0?(t<0&&(t=n),t+=+e.slice(n+1),e=e.substring(0,n)):t<0&&(t=e.length),i=e.length,n=0;n<i&&e.charAt(n)=="0";)++n;if(n==i)r.c=[r.e=0];else{for(;i>0&&e.charAt(--i)=="0";);for(r.e=t-n-1,r.c=[],t=0;n<=i;)r.c[t++]=+e.charAt(n++)}return r}function gt(r,e,t,n){var i=r.c;if(t===Re&&(t=r.constructor.RM),t!==0&&t!==1&&t!==2&&t!==3)throw Error(bu);if(e<1)n=t===3&&(n||!!i[0])||e===0&&(t===1&&i[0]>=5||t===2&&(i[0]>5||i[0]===5&&(n||i[1]!==Re))),i.length=1,n?(r.e=r.e-e+1,i[0]=1):i[0]=r.e=0;else if(e<i.length){if(n=t===1&&i[e]>=5||t===2&&(i[e]>5||i[e]===5&&(n||i[e+1]!==Re||i[e-1]&1))||t===3&&(n||!!i[0]),i.length=e,n){for(;++i[--e]>9;)if(i[e]=0,e===0){++r.e,i.unshift(1);break}}for(e=i.length;!i[--e];)i.pop()}return r}function bt(r,e,t){var n=r.e,i=r.c.join(""),a=i.length;if(e)i=i.charAt(0)+(a>1?"."+i.slice(1):"")+(n<0?"e":"e+")+n;else if(n<0){for(;++n;)i="0"+i;i="0."+i}else if(n>0)if(++n>a)for(n-=a;n--;)i+="0";else n<a&&(i=i.slice(0,n)+"."+i.slice(n));else a>1&&(i=i.charAt(0)+"."+i.slice(1));return r.s<0&&t?"-"+i:i}j.abs=function(){var r=new this.constructor(this);return r.s=1,r};j.cmp=function(r){var e,t=this,n=t.c,i=(r=new t.constructor(r)).c,a=t.s,s=r.s,o=t.e,l=r.e;if(!n[0]||!i[0])return n[0]?a:i[0]?-s:0;if(a!=s)return a;if(e=a<0,o!=l)return o>l^e?1:-1;for(s=(o=n.length)<(l=i.length)?o:l,a=-1;++a<s;)if(n[a]!=i[a])return n[a]>i[a]^e?1:-1;return o==l?0:o>l^e?1:-1};j.div=function(r){var e=this,t=e.constructor,n=e.c,i=(r=new t(r)).c,a=e.s==r.s?1:-1,s=t.DP;if(s!==~~s||s<0||s>ht)throw Error(nn);if(!i[0])throw Error($a);if(!n[0])return r.s=a,r.c=[r.e=0],r;var o,l,u,c,d,f=i.slice(),p=o=i.length,h=n.length,m=n.slice(0,o),g=m.length,b=r,y=b.c=[],v=0,w=s+(b.e=e.e-r.e)+1;for(b.s=a,a=w<0?0:w,f.unshift(0);g++<o;)m.push(0);do{for(u=0;u<10;u++){if(o!=(g=m.length))c=o>g?1:-1;else for(d=-1,c=0;++d<o;)if(i[d]!=m[d]){c=i[d]>m[d]?1:-1;break}if(c<0){for(l=g==o?i:f;g;){if(m[--g]<l[g]){for(d=g;d&&!m[--d];)m[d]=9;--m[d],m[g]+=10}m[g]-=l[g]}for(;!m[0];)m.shift()}else break}y[v++]=c?u:++u,m[0]&&c?m[g]=n[p]||0:m=[n[p]]}while((p++<h||m[0]!==Re)&&a--);return!y[0]&&v!=1&&(y.shift(),b.e--,w--),v>w&>(b,w,t.RM,m[0]!==Re),b};j.eq=function(r){return this.cmp(r)===0};j.gt=function(r){return this.cmp(r)>0};j.gte=function(r){return this.cmp(r)>-1};j.lt=function(r){return this.cmp(r)<0};j.lte=function(r){return this.cmp(r)<1};j.minus=j.sub=function(r){var e,t,n,i,a=this,s=a.constructor,o=a.s,l=(r=new s(r)).s;if(o!=l)return r.s=-l,a.plus(r);var u=a.c.slice(),c=a.e,d=r.c,f=r.e;if(!u[0]||!d[0])return d[0]?r.s=-l:u[0]?r=new s(a):r.s=1,r;if(o=c-f){for((i=o<0)?(o=-o,n=u):(f=c,n=d),n.reverse(),l=o;l--;)n.push(0);n.reverse()}else for(t=((i=u.length<d.length)?u:d).length,o=l=0;l<t;l++)if(u[l]!=d[l]){i=u[l]<d[l];break}if(i&&(n=u,u=d,d=n,r.s=-r.s),(l=(t=d.length)-(e=u.length))>0)for(;l--;)u[e++]=0;for(l=e;t>o;){if(u[--t]<d[t]){for(e=t;e&&!u[--e];)u[e]=9;--u[e],u[t]+=10}u[t]-=d[t]}for(;u[--l]===0;)u.pop();for(;u[0]===0;)u.shift(),--f;return u[0]||(r.s=1,u=[f=0]),r.c=u,r.e=f,r};j.mod=function(r){var e,t=this,n=t.constructor,i=t.s,a=(r=new n(r)).s;if(!r.c[0])throw Error($a);return t.s=r.s=1,e=r.cmp(t)==1,t.s=i,r.s=a,e?new n(t):(i=n.DP,a=n.RM,n.DP=n.RM=0,t=t.div(r),n.DP=i,n.RM=a,this.minus(t.times(r)))};j.neg=function(){var r=new this.constructor(this);return r.s=-r.s,r};j.plus=j.add=function(r){var e,t,n,i=this,a=i.constructor;if(r=new a(r),i.s!=r.s)return r.s=-r.s,i.minus(r);var s=i.e,o=i.c,l=r.e,u=r.c;if(!o[0]||!u[0])return u[0]||(o[0]?r=new a(i):r.s=i.s),r;if(o=o.slice(),e=s-l){for(e>0?(l=s,n=u):(e=-e,n=o),n.reverse();e--;)n.push(0);n.reverse()}for(o.length-u.length<0&&(n=u,u=o,o=n),e=u.length,t=0;e;o[e]%=10)t=(o[--e]=o[e]+u[e]+t)/10|0;for(t&&(o.unshift(t),++l),e=o.length;o[--e]===0;)o.pop();return r.c=o,r.e=l,r};j.pow=function(r){var e=this,t=new e.constructor("1"),n=t,i=r<0;if(r!==~~r||r<-Pa||r>Pa)throw Error(mt+"exponent");for(i&&(r=-r);r&1&&(n=n.times(e)),r>>=1,!!r;)e=e.times(e);return i?t.div(n):n};j.prec=function(r,e){if(r!==~~r||r<1||r>ht)throw Error(mt+"precision");return gt(new this.constructor(this),r,e)};j.round=function(r,e){if(r===Re)r=0;else if(r!==~~r||r<-ht||r>ht)throw Error(nn);return gt(new this.constructor(this),r+this.e+1,e)};j.sqrt=function(){var r,e,t,n=this,i=n.constructor,a=n.s,s=n.e,o=new i("0.5");if(!n.c[0])return new i(n);if(a<0)throw Error(sr+"No square root");a=Math.sqrt(+bt(n,!0,!0)),a===0||a===1/0?(e=n.c.join(""),e.length+s&1||(e+="0"),a=Math.sqrt(e),s=((s+1)/2|0)-(s<0||s&1),r=new i((a==1/0?"5e":(a=a.toExponential()).slice(0,a.indexOf("e")+1))+s)):r=new i(a+""),s=r.e+(i.DP+=4);do t=r,r=o.times(t.plus(n.div(t)));while(t.c.slice(0,s).join("")!==r.c.slice(0,s).join(""));return gt(r,(i.DP-=4)+r.e+1,i.RM)};j.times=j.mul=function(r){var e,t=this,n=t.constructor,i=t.c,a=(r=new n(r)).c,s=i.length,o=a.length,l=t.e,u=r.e;if(r.s=t.s==r.s?1:-1,!i[0]||!a[0])return r.c=[r.e=0],r;for(r.e=l+u,s<o&&(e=i,i=a,a=e,u=s,s=o,o=u),e=new Array(u=s+o);u--;)e[u]=0;for(l=o;l--;){for(o=0,u=s+l;u>l;)o=e[u]+a[l]*i[u-l-1]+o,e[u--]=o%10,o=o/10|0;e[u]=o}for(o?++r.e:e.shift(),l=e.length;!e[--l];)e.pop();return r.c=e,r};j.toExponential=function(r,e){var t=this,n=t.c[0];if(r!==Re){if(r!==~~r||r<0||r>ht)throw Error(nn);for(t=gt(new t.constructor(t),++r,e);t.c.length<r;)t.c.push(0)}return bt(t,!0,!!n)};j.toFixed=function(r,e){var t=this,n=t.c[0];if(r!==Re){if(r!==~~r||r<0||r>ht)throw Error(nn);for(t=gt(new t.constructor(t),r+t.e+1,e),r=r+t.e+1;t.c.length<r;)t.c.push(0)}return bt(t,!1,!!n)};j[Symbol.for("nodejs.util.inspect.custom")]=j.toJSON=j.toString=function(){var r=this,e=r.constructor;return bt(r,r.e<=e.NE||r.e>=e.PE,!!r.c[0])};j.toNumber=function(){var r=+bt(this,!0,!0);if(this.constructor.strict===!0&&!this.eq(r.toString()))throw Error(sr+"Imprecise conversion");return r};j.toPrecision=function(r,e){var t=this,n=t.constructor,i=t.c[0];if(r!==Re){if(r!==~~r||r<1||r>ht)throw Error(mt+"precision");for(t=gt(new n(t),r,e);t.c.length<r;)t.c.push(0)}return bt(t,r<=t.e||t.e<=n.NE||t.e>=n.PE,!!i)};j.valueOf=function(){var r=this,e=r.constructor;if(e.strict===!0)throw Error(sr+"valueOf disallowed");return bt(r,r.e<=e.NE||r.e>=e.PE,!0)};var yu=Fa(),Ua=yu;var _i={};ga(_i,{DecodeError:()=>pe,Decoder:()=>Ie,EXT_TIMESTAMP:()=>ui,Encoder:()=>Bt,ExtData:()=>Se,ExtensionCodec:()=>it,decode:()=>Ya,decodeArrayStream:()=>Ka,decodeAsync:()=>Ja,decodeMulti:()=>Za,decodeMultiStream:()=>Qa,decodeTimestampExtension:()=>hi,decodeTimestampToTimeSpec:()=>pi,encode:()=>on,encodeDateToTimeSpec:()=>di,encodeTimeSpecToTimestamp:()=>ci,encodeTimestampExtension:()=>fi});function qa(r){let e=r.length,t=0,n=0;for(;n<e;){let i=r.charCodeAt(n++);if((i&4294967168)===0){t++;continue}else if((i&4294965248)===0)t+=2;else{if(i>=55296&&i<=56319&&n<e){let a=r.charCodeAt(n);(a&64512)===56320&&(++n,i=((i&1023)<<10)+(a&1023)+65536)}(i&4294901760)===0?t+=3:t+=4}}return t}function vu(r,e,t){let n=r.length,i=t,a=0;for(;a<n;){let s=r.charCodeAt(a++);if((s&4294967168)===0){e[i++]=s;continue}else if((s&4294965248)===0)e[i++]=s>>6&31|192;else{if(s>=55296&&s<=56319&&a<n){let o=r.charCodeAt(a);(o&64512)===56320&&(++a,s=((s&1023)<<10)+(o&1023)+65536)}(s&4294901760)===0?(e[i++]=s>>12&15|224,e[i++]=s>>6&63|128):(e[i++]=s>>18&7|240,e[i++]=s>>12&63|128,e[i++]=s>>6&63|128)}e[i++]=s&63|128}}var xu=new TextEncoder,Eu=50;function ku(r,e,t){xu.encodeInto(r,e.subarray(t))}function ja(r,e,t){r.length>Eu?ku(r,e,t):vu(r,e,t)}var Au=4096;function li(r,e,t){let n=e,i=n+t,a=[],s="";for(;n<i;){let o=r[n++];if((o&128)===0)a.push(o);else if((o&224)===192){let l=r[n++]&63;a.push((o&31)<<6|l)}else if((o&240)===224){let l=r[n++]&63,u=r[n++]&63;a.push((o&31)<<12|l<<6|u)}else if((o&248)===240){let l=r[n++]&63,u=r[n++]&63,c=r[n++]&63,d=(o&7)<<18|l<<12|u<<6|c;d>65535&&(d-=65536,a.push(d>>>10&1023|55296),d=56320|d&1023),a.push(d)}else a.push(o);a.length>=Au&&(s+=String.fromCharCode(...a),a.length=0)}return a.length>0&&(s+=String.fromCharCode(...a)),s}var Du=new TextDecoder,Tu=200;function Cu(r,e,t){let n=r.subarray(e,e+t);return Du.decode(n)}function za(r,e,t){return t>Tu?Cu(r,e,t):li(r,e,t)}var Se=class{type;data;constructor(e,t){this.type=e,this.data=t}};var pe=class r extends Error{constructor(e){super(e);let t=Object.create(r.prototype);Object.setPrototypeOf(this,t),Object.defineProperty(this,"name",{configurable:!0,enumerable:!1,value:r.name})}};function Va(r,e,t){let n=t/4294967296,i=t;r.setUint32(e,n),r.setUint32(e+4,i)}function an(r,e,t){let n=Math.floor(t/4294967296),i=t;r.setUint32(e,n),r.setUint32(e+4,i)}function sn(r,e){let t=r.getInt32(e),n=r.getUint32(e+4);return t*4294967296+n}function Ha(r,e){let t=r.getUint32(e),n=r.getUint32(e+4);return t*4294967296+n}var ui=-1,Nu=4294967296-1,Su=17179869184-1;function ci({sec:r,nsec:e}){if(r>=0&&e>=0&&r<=Su)if(e===0&&r<=Nu){let t=new Uint8Array(4);return new DataView(t.buffer).setUint32(0,r),t}else{let t=r/4294967296,n=r&4294967295,i=new Uint8Array(8),a=new DataView(i.buffer);return a.setUint32(0,e<<2|t&3),a.setUint32(4,n),i}else{let t=new Uint8Array(12),n=new DataView(t.buffer);return n.setUint32(0,e),an(n,4,r),t}}function di(r){let e=r.getTime(),t=Math.floor(e/1e3),n=(e-t*1e3)*1e6,i=Math.floor(n/1e9);return{sec:t+i,nsec:n-i*1e9}}function fi(r){if(r instanceof Date){let e=di(r);return ci(e)}else return null}function pi(r){let e=new DataView(r.buffer,r.byteOffset,r.byteLength);switch(r.byteLength){case 4:return{sec:e.getUint32(0),nsec:0};case 8:{let t=e.getUint32(0),n=e.getUint32(4),i=(t&3)*4294967296+n,a=t>>>2;return{sec:i,nsec:a}}case 12:{let t=sn(e,4),n=e.getUint32(0);return{sec:t,nsec:n}}default:throw new pe(`Unrecognized data size for timestamp (expected 4, 8, or 12): ${r.length}`)}}function hi(r){let e=pi(r);return new Date(e.sec*1e3+e.nsec/1e6)}var Wa={type:ui,encode:fi,decode:hi};var it=class r{static defaultCodec=new r;__brand;builtInEncoders=[];builtInDecoders=[];encoders=[];decoders=[];constructor(){this.register(Wa)}register({type:e,encode:t,decode:n}){if(e>=0)this.encoders[e]=t,this.decoders[e]=n;else{let i=-1-e;this.builtInEncoders[i]=t,this.builtInDecoders[i]=n}}tryToEncode(e,t){for(let n=0;n<this.builtInEncoders.length;n++){let i=this.builtInEncoders[n];if(i!=null){let a=i(e,t);if(a!=null){let s=-1-n;return new Se(s,a)}}}for(let n=0;n<this.encoders.length;n++){let i=this.encoders[n];if(i!=null){let a=i(e,t);if(a!=null){let s=n;return new Se(s,a)}}}return e instanceof Se?e:null}decode(e,t,n){let i=t<0?this.builtInDecoders[-1-t]:this.decoders[t];return i?i(e,t,n):new Se(t,e)}};function Iu(r){return r instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&r instanceof SharedArrayBuffer}function or(r){return r instanceof Uint8Array?r:ArrayBuffer.isView(r)?new Uint8Array(r.buffer,r.byteOffset,r.byteLength):Iu(r)?new Uint8Array(r):Uint8Array.from(r)}var Bu=100,Ou=2048,Bt=class r{extensionCodec;context;useBigInt64;maxDepth;initialBufferSize;sortKeys;forceFloat32;ignoreUndefined;forceIntegerToFloat;pos;view;bytes;entered=!1;constructor(e){this.extensionCodec=e?.extensionCodec??it.defaultCodec,this.context=e?.context,this.useBigInt64=e?.useBigInt64??!1,this.maxDepth=e?.maxDepth??Bu,this.initialBufferSize=e?.initialBufferSize??Ou,this.sortKeys=e?.sortKeys??!1,this.forceFloat32=e?.forceFloat32??!1,this.ignoreUndefined=e?.ignoreUndefined??!1,this.forceIntegerToFloat=e?.forceIntegerToFloat??!1,this.pos=0,this.view=new DataView(new ArrayBuffer(this.initialBufferSize)),this.bytes=new Uint8Array(this.view.buffer)}clone(){return new r({extensionCodec:this.extensionCodec,context:this.context,useBigInt64:this.useBigInt64,maxDepth:this.maxDepth,initialBufferSize:this.initialBufferSize,sortKeys:this.sortKeys,forceFloat32:this.forceFloat32,ignoreUndefined:this.ignoreUndefined,forceIntegerToFloat:this.forceIntegerToFloat})}reinitializeState(){this.pos=0}encodeSharedRef(e){if(this.entered)return this.clone().encodeSharedRef(e);try{return this.entered=!0,this.reinitializeState(),this.doEncode(e,1),this.bytes.subarray(0,this.pos)}finally{this.entered=!1}}encode(e){if(this.entered)return this.clone().encode(e);try{return this.entered=!0,this.reinitializeState(),this.doEncode(e,1),this.bytes.slice(0,this.pos)}finally{this.entered=!1}}doEncode(e,t){if(t>this.maxDepth)throw new Error(`Too deep objects in depth ${t}`);e==null?this.encodeNil():typeof e=="boolean"?this.encodeBoolean(e):typeof e=="number"?this.forceIntegerToFloat?this.encodeNumberAsFloat(e):this.encodeNumber(e):typeof e=="string"?this.encodeString(e):this.useBigInt64&&typeof e=="bigint"?this.encodeBigInt64(e):this.encodeObject(e,t)}ensureBufferSizeToWrite(e){let t=this.pos+e;this.view.byteLength<t&&this.resizeBuffer(t*2)}resizeBuffer(e){let t=new ArrayBuffer(e),n=new Uint8Array(t),i=new DataView(t);n.set(this.bytes),this.view=i,this.bytes=n}encodeNil(){this.writeU8(192)}encodeBoolean(e){e===!1?this.writeU8(194):this.writeU8(195)}encodeNumber(e){!this.forceIntegerToFloat&&Number.isSafeInteger(e)?e>=0?e<128?this.writeU8(e):e<256?(this.writeU8(204),this.writeU8(e)):e<65536?(this.writeU8(205),this.writeU16(e)):e<4294967296?(this.writeU8(206),this.writeU32(e)):this.useBigInt64?this.encodeNumberAsFloat(e):(this.writeU8(207),this.writeU64(e)):e>=-32?this.writeU8(224|e+32):e>=-128?(this.writeU8(208),this.writeI8(e)):e>=-32768?(this.writeU8(209),this.writeI16(e)):e>=-2147483648?(this.writeU8(210),this.writeI32(e)):this.useBigInt64?this.encodeNumberAsFloat(e):(this.writeU8(211),this.writeI64(e)):this.encodeNumberAsFloat(e)}encodeNumberAsFloat(e){this.forceFloat32?(this.writeU8(202),this.writeF32(e)):(this.writeU8(203),this.writeF64(e))}encodeBigInt64(e){e>=BigInt(0)?(this.writeU8(207),this.writeBigUint64(e)):(this.writeU8(211),this.writeBigInt64(e))}writeStringHeader(e){if(e<32)this.writeU8(160+e);else if(e<256)this.writeU8(217),this.writeU8(e);else if(e<65536)this.writeU8(218),this.writeU16(e);else if(e<4294967296)this.writeU8(219),this.writeU32(e);else throw new Error(`Too long string: ${e} bytes in UTF-8`)}encodeString(e){let n=qa(e);this.ensureBufferSizeToWrite(5+n),this.writeStringHeader(n),ja(e,this.bytes,this.pos),this.pos+=n}encodeObject(e,t){let n=this.extensionCodec.tryToEncode(e,this.context);if(n!=null)this.encodeExtension(n);else if(Array.isArray(e))this.encodeArray(e,t);else if(ArrayBuffer.isView(e))this.encodeBinary(e);else if(typeof e=="object")this.encodeMap(e,t);else throw new Error(`Unrecognized object: ${Object.prototype.toString.apply(e)}`)}encodeBinary(e){let t=e.byteLength;if(t<256)this.writeU8(196),this.writeU8(t);else if(t<65536)this.writeU8(197),this.writeU16(t);else if(t<4294967296)this.writeU8(198),this.writeU32(t);else throw new Error(`Too large binary: ${t}`);let n=or(e);this.writeU8a(n)}encodeArray(e,t){let n=e.length;if(n<16)this.writeU8(144+n);else if(n<65536)this.writeU8(220),this.writeU16(n);else if(n<4294967296)this.writeU8(221),this.writeU32(n);else throw new Error(`Too large array: ${n}`);for(let i of e)this.doEncode(i,t+1)}countWithoutUndefined(e,t){let n=0;for(let i of t)e[i]!==void 0&&n++;return n}encodeMap(e,t){let n=Object.keys(e);this.sortKeys&&n.sort();let i=this.ignoreUndefined?this.countWithoutUndefined(e,n):n.length;if(i<16)this.writeU8(128+i);else if(i<65536)this.writeU8(222),this.writeU16(i);else if(i<4294967296)this.writeU8(223),this.writeU32(i);else throw new Error(`Too large map object: ${i}`);for(let a of n){let s=e[a];this.ignoreUndefined&&s===void 0||(this.encodeString(a),this.doEncode(s,t+1))}}encodeExtension(e){if(typeof e.data=="function"){let n=e.data(this.pos+6),i=n.length;if(i>=4294967296)throw new Error(`Too large extension object: ${i}`);this.writeU8(201),this.writeU32(i),this.writeI8(e.type),this.writeU8a(n);return}let t=e.data.length;if(t===1)this.writeU8(212);else if(t===2)this.writeU8(213);else if(t===4)this.writeU8(214);else if(t===8)this.writeU8(215);else if(t===16)this.writeU8(216);else if(t<256)this.writeU8(199),this.writeU8(t);else if(t<65536)this.writeU8(200),this.writeU16(t);else if(t<4294967296)this.writeU8(201),this.writeU32(t);else throw new Error(`Too large extension object: ${t}`);this.writeI8(e.type),this.writeU8a(e.data)}writeU8(e){this.ensureBufferSizeToWrite(1),this.view.setUint8(this.pos,e),this.pos++}writeU8a(e){let t=e.length;this.ensureBufferSizeToWrite(t),this.bytes.set(e,this.pos),this.pos+=t}writeI8(e){this.ensureBufferSizeToWrite(1),this.view.setInt8(this.pos,e),this.pos++}writeU16(e){this.ensureBufferSizeToWrite(2),this.view.setUint16(this.pos,e),this.pos+=2}writeI16(e){this.ensureBufferSizeToWrite(2),this.view.setInt16(this.pos,e),this.pos+=2}writeU32(e){this.ensureBufferSizeToWrite(4),this.view.setUint32(this.pos,e),this.pos+=4}writeI32(e){this.ensureBufferSizeToWrite(4),this.view.setInt32(this.pos,e),this.pos+=4}writeF32(e){this.ensureBufferSizeToWrite(4),this.view.setFloat32(this.pos,e),this.pos+=4}writeF64(e){this.ensureBufferSizeToWrite(8),this.view.setFloat64(this.pos,e),this.pos+=8}writeU64(e){this.ensureBufferSizeToWrite(8),Va(this.view,this.pos,e),this.pos+=8}writeI64(e){this.ensureBufferSizeToWrite(8),an(this.view,this.pos,e),this.pos+=8}writeBigUint64(e){this.ensureBufferSizeToWrite(8),this.view.setBigUint64(this.pos,e),this.pos+=8}writeBigInt64(e){this.ensureBufferSizeToWrite(8),this.view.setBigInt64(this.pos,e),this.pos+=8}};function on(r,e){return new Bt(e).encodeSharedRef(r)}function ln(r){return`${r<0?"-":""}0x${Math.abs(r).toString(16).padStart(2,"0")}`}var Mu=16,Ru=16,un=class{hit=0;miss=0;caches;maxKeyLength;maxLengthPerKey;constructor(e=Mu,t=Ru){this.maxKeyLength=e,this.maxLengthPerKey=t,this.caches=[];for(let n=0;n<this.maxKeyLength;n++)this.caches.push([])}canBeCached(e){return e>0&&e<=this.maxKeyLength}find(e,t,n){let i=this.caches[n-1];e:for(let a of i){let s=a.bytes;for(let o=0;o<n;o++)if(s[o]!==e[t+o])continue e;return a.str}return null}store(e,t){let n=this.caches[e.length-1],i={bytes:e,str:t};n.length>=this.maxLengthPerKey?n[Math.random()*n.length|0]=i:n.push(i)}decode(e,t,n){let i=this.find(e,t,n);if(i!=null)return this.hit++,i;this.miss++;let a=li(e,t,n),s=Uint8Array.prototype.slice.call(e,t,t+n);return this.store(s,a),a}};var mi="array",cr="map_key",Xa="map_value",Lu=r=>{if(typeof r=="string"||typeof r=="number")return r;throw new pe("The type of key must be string or number but "+typeof r)},gi=class{stack=[];stackHeadPosition=-1;get length(){return this.stackHeadPosition+1}top(){return this.stack[this.stackHeadPosition]}pushArrayState(e){let t=this.getUninitializedStateFromPool();t.type=mi,t.position=0,t.size=e,t.array=new Array(e)}pushMapState(e){let t=this.getUninitializedStateFromPool();t.type=cr,t.readCount=0,t.size=e,t.map={}}getUninitializedStateFromPool(){if(this.stackHeadPosition++,this.stackHeadPosition===this.stack.length){let e={type:void 0,size:0,array:void 0,position:0,readCount:0,map:void 0,key:null};this.stack.push(e)}return this.stack[this.stackHeadPosition]}release(e){if(this.stack[this.stackHeadPosition]!==e)throw new Error("Invalid stack state. Released state is not on top of the stack.");if(e.type===mi){let n=e;n.size=0,n.array=void 0,n.position=0,n.type=void 0}if(e.type===cr||e.type===Xa){let n=e;n.size=0,n.map=void 0,n.readCount=0,n.type=void 0}this.stackHeadPosition--}reset(){this.stack.length=0,this.stackHeadPosition=-1}},ur=-1,bi=new DataView(new ArrayBuffer(0)),Pu=new Uint8Array(bi.buffer);try{bi.getInt8(0)}catch(r){if(!(r instanceof RangeError))throw new Error("This module is not supported in the current JavaScript engine because DataView does not throw RangeError on out-of-bounds access")}var Ga=new RangeError("Insufficient data"),$u=new un,Ie=class r{extensionCodec;context;useBigInt64;rawStrings;maxStrLength;maxBinLength;maxArrayLength;maxMapLength;maxExtLength;keyDecoder;mapKeyConverter;totalPos=0;pos=0;view=bi;bytes=Pu;headByte=ur;stack=new gi;entered=!1;constructor(e){this.extensionCodec=e?.extensionCodec??it.defaultCodec,this.context=e?.context,this.useBigInt64=e?.useBigInt64??!1,this.rawStrings=e?.rawStrings??!1,this.maxStrLength=e?.maxStrLength??4294967295,this.maxBinLength=e?.maxBinLength??4294967295,this.maxArrayLength=e?.maxArrayLength??4294967295,this.maxMapLength=e?.maxMapLength??4294967295,this.maxExtLength=e?.maxExtLength??4294967295,this.keyDecoder=e?.keyDecoder!==void 0?e.keyDecoder:$u,this.mapKeyConverter=e?.mapKeyConverter??Lu}clone(){return new r({extensionCodec:this.extensionCodec,context:this.context,useBigInt64:this.useBigInt64,rawStrings:this.rawStrings,maxStrLength:this.maxStrLength,maxBinLength:this.maxBinLength,maxArrayLength:this.maxArrayLength,maxMapLength:this.maxMapLength,maxExtLength:this.maxExtLength,keyDecoder:this.keyDecoder})}reinitializeState(){this.totalPos=0,this.headByte=ur,this.stack.reset()}setBuffer(e){let t=or(e);this.bytes=t,this.view=new DataView(t.buffer,t.byteOffset,t.byteLength),this.pos=0}appendBuffer(e){if(this.headByte===ur&&!this.hasRemaining(1))this.setBuffer(e);else{let t=this.bytes.subarray(this.pos),n=or(e),i=new Uint8Array(t.length+n.length);i.set(t),i.set(n,t.length),this.setBuffer(i)}}hasRemaining(e){return this.view.byteLength-this.pos>=e}createExtraByteError(e){let{view:t,pos:n}=this;return new RangeError(`Extra ${t.byteLength-n} of ${t.byteLength} byte(s) found at buffer[${e}]`)}decode(e){if(this.entered)return this.clone().decode(e);try{this.entered=!0,this.reinitializeState(),this.setBuffer(e);let t=this.doDecodeSync();if(this.hasRemaining(1))throw this.createExtraByteError(this.pos);return t}finally{this.entered=!1}}*decodeMulti(e){if(this.entered){yield*this.clone().decodeMulti(e);return}try{for(this.entered=!0,this.reinitializeState(),this.setBuffer(e);this.hasRemaining(1);)yield this.doDecodeSync()}finally{this.entered=!1}}async decodeAsync(e){if(this.entered)return this.clone().decodeAsync(e);try{this.entered=!0;let t=!1,n;for await(let o of e){if(t)throw this.entered=!1,this.createExtraByteError(this.totalPos);this.appendBuffer(o);try{n=this.doDecodeSync(),t=!0}catch(l){if(!(l instanceof RangeError))throw l}this.totalPos+=this.pos}if(t){if(this.hasRemaining(1))throw this.createExtraByteError(this.totalPos);return n}let{headByte:i,pos:a,totalPos:s}=this;throw new RangeError(`Insufficient data in parsing ${ln(i)} at ${s} (${a} in the current buffer)`)}finally{this.entered=!1}}decodeArrayStream(e){return this.decodeMultiAsync(e,!0)}decodeStream(e){return this.decodeMultiAsync(e,!1)}async*decodeMultiAsync(e,t){if(this.entered){yield*this.clone().decodeMultiAsync(e,t);return}try{this.entered=!0;let n=t,i=-1;for await(let a of e){if(t&&i===0)throw this.createExtraByteError(this.totalPos);this.appendBuffer(a),n&&(i=this.readArraySize(),n=!1,this.complete());try{for(;yield this.doDecodeSync(),--i!==0;);}catch(s){if(!(s instanceof RangeError))throw s}this.totalPos+=this.pos}}finally{this.entered=!1}}doDecodeSync(){e:for(;;){let e=this.readHeadByte(),t;if(e>=224)t=e-256;else if(e<192)if(e<128)t=e;else if(e<144){let i=e-128;if(i!==0){this.pushMapState(i),this.complete();continue e}else t={}}else if(e<160){let i=e-144;if(i!==0){this.pushArrayState(i),this.complete();continue e}else t=[]}else{let i=e-160;t=this.decodeString(i,0)}else if(e===192)t=null;else if(e===194)t=!1;else if(e===195)t=!0;else if(e===202)t=this.readF32();else if(e===203)t=this.readF64();else if(e===204)t=this.readU8();else if(e===205)t=this.readU16();else if(e===206)t=this.readU32();else if(e===207)this.useBigInt64?t=this.readU64AsBigInt():t=this.readU64();else if(e===208)t=this.readI8();else if(e===209)t=this.readI16();else if(e===210)t=this.readI32();else if(e===211)this.useBigInt64?t=this.readI64AsBigInt():t=this.readI64();else if(e===217){let i=this.lookU8();t=this.decodeString(i,1)}else if(e===218){let i=this.lookU16();t=this.decodeString(i,2)}else if(e===219){let i=this.lookU32();t=this.decodeString(i,4)}else if(e===220){let i=this.readU16();if(i!==0){this.pushArrayState(i),this.complete();continue e}else t=[]}else if(e===221){let i=this.readU32();if(i!==0){this.pushArrayState(i),this.complete();continue e}else t=[]}else if(e===222){let i=this.readU16();if(i!==0){this.pushMapState(i),this.complete();continue e}else t={}}else if(e===223){let i=this.readU32();if(i!==0){this.pushMapState(i),this.complete();continue e}else t={}}else if(e===196){let i=this.lookU8();t=this.decodeBinary(i,1)}else if(e===197){let i=this.lookU16();t=this.decodeBinary(i,2)}else if(e===198){let i=this.lookU32();t=this.decodeBinary(i,4)}else if(e===212)t=this.decodeExtension(1,0);else if(e===213)t=this.decodeExtension(2,0);else if(e===214)t=this.decodeExtension(4,0);else if(e===215)t=this.decodeExtension(8,0);else if(e===216)t=this.decodeExtension(16,0);else if(e===199){let i=this.lookU8();t=this.decodeExtension(i,1)}else if(e===200){let i=this.lookU16();t=this.decodeExtension(i,2)}else if(e===201){let i=this.lookU32();t=this.decodeExtension(i,4)}else throw new pe(`Unrecognized type byte: ${ln(e)}`);this.complete();let n=this.stack;for(;n.length>0;){let i=n.top();if(i.type===mi)if(i.array[i.position]=t,i.position++,i.position===i.size)t=i.array,n.release(i);else continue e;else if(i.type===cr){if(t==="__proto__")throw new pe("The key __proto__ is not allowed");i.key=this.mapKeyConverter(t),i.type=Xa;continue e}else if(i.map[i.key]=t,i.readCount++,i.readCount===i.size)t=i.map,n.release(i);else{i.key=null,i.type=cr;continue e}}return t}}readHeadByte(){return this.headByte===ur&&(this.headByte=this.readU8()),this.headByte}complete(){this.headByte=ur}readArraySize(){let e=this.readHeadByte();switch(e){case 220:return this.readU16();case 221:return this.readU32();default:{if(e<160)return e-144;throw new pe(`Unrecognized array type byte: ${ln(e)}`)}}}pushMapState(e){if(e>this.maxMapLength)throw new pe(`Max length exceeded: map length (${e}) > maxMapLengthLength (${this.maxMapLength})`);this.stack.pushMapState(e)}pushArrayState(e){if(e>this.maxArrayLength)throw new pe(`Max length exceeded: array length (${e}) > maxArrayLength (${this.maxArrayLength})`);this.stack.pushArrayState(e)}decodeString(e,t){return!this.rawStrings||this.stateIsMapKey()?this.decodeUtf8String(e,t):this.decodeBinary(e,t)}decodeUtf8String(e,t){if(e>this.maxStrLength)throw new pe(`Max length exceeded: UTF-8 byte length (${e}) > maxStrLength (${this.maxStrLength})`);if(this.bytes.byteLength<this.pos+t+e)throw Ga;let n=this.pos+t,i;return this.stateIsMapKey()&&this.keyDecoder?.canBeCached(e)?i=this.keyDecoder.decode(this.bytes,n,e):i=za(this.bytes,n,e),this.pos+=t+e,i}stateIsMapKey(){return this.stack.length>0?this.stack.top().type===cr:!1}decodeBinary(e,t){if(e>this.maxBinLength)throw new pe(`Max length exceeded: bin length (${e}) > maxBinLength (${this.maxBinLength})`);if(!this.hasRemaining(e+t))throw Ga;let n=this.pos+t,i=this.bytes.subarray(n,n+e);return this.pos+=t+e,i}decodeExtension(e,t){if(e>this.maxExtLength)throw new pe(`Max length exceeded: ext length (${e}) > maxExtLength (${this.maxExtLength})`);let n=this.view.getInt8(this.pos+t),i=this.decodeBinary(e,t+1);return this.extensionCodec.decode(i,n,this.context)}lookU8(){return this.view.getUint8(this.pos)}lookU16(){return this.view.getUint16(this.pos)}lookU32(){return this.view.getUint32(this.pos)}readU8(){let e=this.view.getUint8(this.pos);return this.pos++,e}readI8(){let e=this.view.getInt8(this.pos);return this.pos++,e}readU16(){let e=this.view.getUint16(this.pos);return this.pos+=2,e}readI16(){let e=this.view.getInt16(this.pos);return this.pos+=2,e}readU32(){let e=this.view.getUint32(this.pos);return this.pos+=4,e}readI32(){let e=this.view.getInt32(this.pos);return this.pos+=4,e}readU64(){let e=Ha(this.view,this.pos);return this.pos+=8,e}readI64(){let e=sn(this.view,this.pos);return this.pos+=8,e}readU64AsBigInt(){let e=this.view.getBigUint64(this.pos);return this.pos+=8,e}readI64AsBigInt(){let e=this.view.getBigInt64(this.pos);return this.pos+=8,e}readF32(){let e=this.view.getFloat32(this.pos);return this.pos+=4,e}readF64(){let e=this.view.getFloat64(this.pos);return this.pos+=8,e}};function Ya(r,e){return new Ie(e).decode(r)}function Za(r,e){return new Ie(e).decodeMulti(r)}function Fu(r){return r[Symbol.asyncIterator]!=null}async function*Uu(r){let e=r.getReader();try{for(;;){let{done:t,value:n}=await e.read();if(t)return;yield n}}finally{e.releaseLock()}}function cn(r){return Fu(r)?r:Uu(r)}async function Ja(r,e){let t=cn(r);return new Ie(e).decodeAsync(t)}function Ka(r,e){let t=cn(r);return new Ie(e).decodeArrayStream(t)}function Qa(r,e){let t=cn(r);return new Ie(e).decodeStream(t)}var Nn=ba(Ui(),1),qi=La,ji=Ua,Fe=_i,io=Nn.DOMParser,ao=Nn.XMLSerializer;var so=Fe!==null;function oo(){if(!so)throw new Error("@msgpack/msgpack is required for MessagePack support. Install with: npm install @msgpack/msgpack")}var lo=Fd();function Fd(){if(!so)return null;let r=new TextEncoder,e=new TextDecoder,t=new Fe.ExtensionCodec;return t.register({type:-1,encode:n=>{if(n instanceof Date){let i=xt(n);if(i==="D"||i==="H")return null}return Fe.encodeTimestampExtension(n)},decode:n=>Fe.decodeTimestampExtension(n)}),t.register({type:1,encode:n=>Te(n)?r.encode(n.toString()):null,decode:n=>Sn(e.decode(n))}),t.register({type:2,encode:n=>{if(n instanceof Date&&xt(n)==="D"){let i=n.getUTCFullYear(),a=String(n.getUTCMonth()+1).padStart(2,"0"),s=String(n.getUTCDate()).padStart(2,"0");return r.encode(`${i}-${a}-${s}`)}return null},decode:n=>new Date(e.decode(n)+"T00:00:00.000Z")}),t.register({type:3,encode:n=>{if(n instanceof Date&&xt(n)==="H"){let i=String(n.getUTCHours()).padStart(2,"0"),a=String(n.getUTCMinutes()).padStart(2,"0"),s=String(n.getUTCSeconds()).padStart(2,"0"),o=String(n.getUTCMilliseconds()).padStart(3,"0");return r.encode(`${i}:${a}:${s}.${o}`)}return null},decode:n=>{let i=e.decode(n),a=i.indexOf("."),s=a>=0?i.substring(0,a):i,o=a>=0?i.substring(a+1):"0",[l,u,c]=s.split(":"),d=Math.round(+o.substring(0,3));return new Date(Date.UTC(1970,0,1,+l,+u,+c,d))}}),t.register({type:4,encode:n=>{let i=zi(n);if(i!==null){let[a,s]=i;return r.encode(`${a}:${s(n)}`)}return null},decode:n=>{let i=e.decode(n),a=i.indexOf(":"),s=i.slice(0,a),o=i.slice(a+1),l=dt[s];if(l!==void 0){let[,u]=l;return u(o)}return`${o}::${s}`}}),t}function uo(r){return oo(),Fe.encode(r,{extensionCodec:lo})}function co(r){return oo(),Fe.decode(r,{extensionCodec:lo})}function Bn(r,e=!1){let t=On(r);if(t===null)return[!1,String(r)];let[n,i,a]=t;return a&&!e?[!1,String(r)]:[!0,`${i(r)}::${n}`]}function Vi(r){if(!r.includes("::"))return[!1,r];let e=r.lastIndexOf("::"),t=r.slice(0,e),n=r.slice(e+2),i=dt[n];if(i===void 0)return[!1,r];let[,a]=i;return[!0,a(t)]}function In(r,e,t){if(r!==null&&typeof r=="object"&&!Array.isArray(r)){let n={};for(let[i,a]of Object.entries(r))n[i]=In(a,e,t);return n}return Array.isArray(r)?r.map(n=>In(n,e,t)):t(r)?e(r):r}function Hi(r){let e=On(r);if(e!==null){let[t,n,i]=e;return i?[r,!1]:[`${n(r)}::${t}`,!0]}if(Array.isArray(r)){let t=!1;return[r.map(i=>{let[a,s]=Hi(i);return s&&(t=!0),a}),t]}if(r!==null&&typeof r=="object"){let t=!1,n={};for(let[i,a]of Object.entries(r)){let[s,o]=Hi(a);o&&(t=!0),n[i]=s}return[n,t]}return[r,!1]}function Ud(r,e=!1){let[t,n]=Bn(r,e);if(t)return n;let[i,a]=Hi(r),s=JSON.stringify(i);return a?`${s}::JS`:s}function qd(r){return JSON.stringify(r)}function jd(r){if(!Fe)throw new Error("@msgpack/msgpack is required for MessagePack support");return Fe.encode(r)}function Ee(r,e=null,{raw:t=!1,qs:n=!1,_forceSuffix:i=!1}={}){if(n)return`${po(r)}::QS`;if(t){if(e===null||e==="json")return qd(r);if(e==="msgpack")return jd(r);throw e==="xml"?new Error("raw=true is not supported for XML transport"):new Error(`Unknown transport: ${e}`)}if(e===null||e==="json"){let a=Ud(r,i);return e==="json"?`"${a}"`:a}else{if(e==="xml")return`<?xml version="1.0" ?><tytx_root>${fo(r)}</tytx_root>`;if(e==="msgpack")return uo(r);throw new Error(`Unknown transport: ${e}`)}}var Jt,Wi;typeof window<"u"&&window.DOMParser?(Jt=window.DOMParser,Wi=window.XMLSerializer):(Jt=io,Wi=ao);function ho(r){if(r===null||typeof r!="object"||Array.isArray(r))return!1;let e=Object.keys(r);if(e.length!==1)return!1;let t=r[e[0]];return t!==null&&typeof t=="object"&&"value"in t}function mo(r,e,t){let n=r.createElement(e),i=t.attrs||{},a=t.value;for(let[s,o]of Object.entries(i))n.setAttribute(s,Ee(o,null,{_forceSuffix:!0}));if(Array.isArray(a))for(let s of a)if(ho(s)){let[o]=Object.keys(s),l=s[o],u=mo(r,o,l);n.appendChild(u)}else{n.textContent=Ee(a);break}else n.textContent=Ee(a);return n}function fo(r){if(!Jt)throw new Error("XML support requires @xmldom/xmldom package in Node.js");if(ho(r)){let[e]=Object.keys(r),t=r[e],n=new Jt().parseFromString("<root/>","text/xml"),i=mo(n,e,t);return new Wi().serializeToString(i)}else return Ee(r)}function Gi(r){let e={};for(let n=0;n<r.attributes.length;n++){let i=r.attributes[n];e[i.name]=ae(i.value)}let t=[];for(let n=0;n<r.childNodes.length;n++){let i=r.childNodes[n];i.nodeType===1&&t.push(i)}if(t.length>0)if(t.length===1){let n=t[0],i=Gi(n);return{attrs:e,value:{[n.tagName]:i}}}else{let n=[];for(let i of t){let a=Gi(i);n.push({[i.tagName]:a})}return{attrs:e,value:n}}return{attrs:e,value:ae(r.textContent)}}function go(r){if(!Jt)throw new Error("XML support requires @xmldom/xmldom package in Node.js");let n=new Jt().parseFromString(r,"text/xml").documentElement;if(n.tagName==="tytx_root"){let a=null;for(let s=0;s<n.childNodes.length;s++)if(n.childNodes[s].nodeType===1){a=n.childNodes[s];break}if(!a)return ae(n.textContent);n=a}let i=Gi(n);return{[n.tagName]:i}}function zd(r){return typeof r=="string"}function Vd(r){let[e,t]=Vi(r);if(e)return t;let n=r;n.endsWith("::JS")&&(n=n.slice(0,-4));let i;try{i=JSON.parse(n)}catch{return r}return In(i,Hd,zd)}function Hd(r){return r.includes("::")?Vi(r)[1]:r}function Wd(r){let e=go(r);return typeof e=="string"?ae(e):e}function Gd(r){return co(r)}function ae(r,e=null){if(r===null)return null;if(e===null||e==="json"){let t=r;return e==="json"&&r.startsWith('"')&&r.endsWith('"')&&(t=r.slice(1,-1)),Vd(t)}else{if(e==="xml")return Wd(r);if(e==="msgpack")return Gd(r);throw new Error(`Unknown transport: ${e}`)}}function po(r){if(Array.isArray(r))return r.map(e=>String(e)).join("&");if(r!==null&&typeof r=="object"){let e=[];for(let[t,n]of Object.entries(r)){let[i,a]=Bn(n,!0);i?e.push(`${t}=${a}`):e.push(`${t}=${n}`)}return e.join("&")}throw new TypeError(`toQs expects object or array, got ${typeof r}`)}function bo(r){if(!r)return[];let e=r.split("&"),t=e.map(s=>s.includes("=")),n=t.every(Boolean),i=!t.some(Boolean);if(!n&&!i)throw new Error("QS format error: mixed items with and without '='");if(i)return e.map(s=>ae(s));let a={};for(let s of e){let o=s.indexOf("="),l=s.slice(0,o),u=s.slice(o+1);a[l]=ae(u)}return a}var wo=qi||ji||Number,Xd=qi?"decimal.js":ji?"big.js":"number";function Sn(r){return new wo(r)}function Te(r){return Xd==="number"?!1:r instanceof wo}function xt(r){let e=r.getUTCFullYear()===1970&&r.getUTCMonth()===0&&r.getUTCDate()===1,t=r.getUTCHours()===0&&r.getUTCMinutes()===0&&r.getUTCSeconds()===0&&r.getUTCMilliseconds()===0;return e&&!t?"H":t&&!e?"D":"DHZ"}function Yd(r){return r.toString()}function Zd(r){let e=r.getUTCFullYear(),t=String(r.getUTCMonth()+1).padStart(2,"0"),n=String(r.getUTCDate()).padStart(2,"0");return`${e}-${t}-${n}`}function Jd(r){return r.toISOString()}function Kd(r){let e=String(r.getUTCHours()).padStart(2,"0"),t=String(r.getUTCMinutes()).padStart(2,"0"),n=String(r.getUTCSeconds()).padStart(2,"0"),i=String(r.getUTCMilliseconds()).padStart(3,"0");return`${e}:${t}:${n}.${i}`}function Qd(r){return r?"true":"false"}function ef(r){return r.toString()}function tf(r){return r.toString()}function rf(r){let e="";for(let t=0;t<r.length;t+=32768)e+=String.fromCharCode.apply(null,r.subarray(t,t+32768));return btoa(e)}var Mn=[],Xi=new Map;function zi(r){if(r===null||typeof r!="object")return null;for(let e=Object.getPrototypeOf(r);e!==null;e=Object.getPrototypeOf(e))for(let[t,n,i,a]of Mn)if(t.prototype===e)return[n,i,a];return null}function On(r){if(r===null)return["NN",()=>"",!0];if(Te(r))return["N",Yd,!1];if(r instanceof Uint8Array)return["RAW",rf,!1];if(r instanceof Date){let e=xt(r);return e==="D"?["D",Zd,!1]:e==="H"?["H",Kd,!1]:["DHZ",Jd,!1]}return typeof r=="boolean"?["B",Qd,!0]:typeof r=="number"?Number.isInteger(r)?["L",ef,!0]:["R",tf,!0]:zi(r)}function nf(r){return Sn(r)}function af(r){let[e,t,n]=r.split("-").map(Number);return new Date(Date.UTC(e,t-1,n,0,0,0,0))}function _o(r){return new Date(r)}function sf(r){let[e,t,n]=r.split(":"),[i,a]=n.split(".");return new Date(Date.UTC(1970,0,1,Number(e),Number(t),Number(i),Number(a||0)))}function of(r){return r.toLowerCase()==="true"}function lf(r){return parseInt(r,10)}function uf(r){return parseFloat(r)}function cf(r){return r}function df(r){return null}var ff=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/;function pf(r){if(!ff.test(r))throw new Error(`RAW payload is not standard padded base64: '${r}'`);let e=atob(r),t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}function hf(r){return bo(r)}var mf=/^[A-Z]+$/,dt={N:[Object,nf],D:[Date,af],DH:[Date,_o],DHZ:[Date,_o],H:[Date,sf],L:[Number,lf],R:[Number,uf],T:[String,cf],B:[Boolean,of],QS:[Object,hf],NN:[null,df],RAW:[Uint8Array,pf]};function Sr(r){return Object.hasOwn(dt,r)?dt[r][0]:null}function Yi(r,e,t,n,i=!1){if(typeof e!="string"||!mf.test(e))throw new Error(`TYTX suffix '${e}' is invalid: expected uppercase ASCII letters only`);let a=dt[e];if(a!==void 0&&a[0]!==r){let s=a[0]===null?"null":a[0].name;throw new Error(`TYTX suffix '${e}' is already registered for ${s}`)}Mn=Mn.filter(([s])=>s!==r),Mn.push([r,e,t,i]),dt[e]=[r,n]}function Ir(r,e){Xi.set(r,e)}function Ge(r){return Xi.has(r)?Xi.get(r):{}}var yo={network:{maxAttempts:3,delay:1,backoff:2,jitter:!0,on:["TypeError","NetworkError","AbortError"]},aggressive:{maxAttempts:5,delay:.5,backoff:2,jitter:!0,on:["Error"]},gentle:{maxAttempts:2,delay:2,backoff:1.5,jitter:!1,on:["TypeError","NetworkError"]}};function bf(r){let e=r._retryPolicy;return e==null?null:typeof e=="string"?yo[e]||null:e}function _f(r,e){return e.some(t=>t==="Error"?!0:r.name===t||r.constructor.name===t)}function wf(r){return new Promise(e=>setTimeout(e,r))}async function yf(r,e){if(!e)return r();let t=e.maxAttempts||3,n=e.delay||1,i=e.backoff||2,a=e.jitter!==!1,s=e.on||["Error"],o=null,l=n*1e3;for(let u=0;u<t;u++)try{let c=r();return c instanceof Promise?await c:c}catch(c){if(o=c,u<t-1&&_f(c,s)){let d=l;a&&(d*=1+Math.random()*.1),await wf(d),l*=i}else throw c}throw o}var se=class r{static classKwargs={cacheTime:0,readOnly:!1,asBag:null,retryPolicy:null};static classArgs=[];static internalParams=new Set(["cacheTime","readOnly","asBag","retryPolicy"]);constructor(e={}){let n={...this.constructor.classKwargs,...e};for(let a of["interval","reactive"])if(Object.hasOwn(n,a))throw new TypeError(`Removed resolver option: ${a}. Schedule updates in the application; use reset() and read explicitly.`);this.cacheTime=n.cacheTime,this._readOnly=n.readOnly,this._asBag=n.asBag,this._retryPolicy=n.retryPolicy,this._kw={};let i=this.constructor.internalParams;for(let[a,s]of Object.entries(n))i.has(a)||(this._kw[a]=s);this._lastUpdate=null,this._node=null,this._lastEffectiveFingerprint=null,this._cachedValue=null,this.init()}init(){}setNode(e){e!==this._node&&!this.readOnly&&this._lastUpdate!==null&&this.reset(),this._node=e,this.onSetResolver(e)}onSetResolver(e){}get node(){return this._node}get cacheTime(){return this._cacheTime}set cacheTime(e){if(typeof e=="boolean")throw new TypeError("cacheTime must be numeric; use a negative value for infinite caching");this._cacheTime=e}get readOnly(){return this._readOnly}get expired(){return this._cacheTime<0?this._lastUpdate===null:this._cacheTime===0||this._lastUpdate===null?!0:(Date.now()-this._lastUpdate)/1e3>this._cacheTime}reset(...e){if(e.length)throw new TypeError("reset() takes no arguments. It invalidates the cache for the next explicit read.");this._lastUpdate=null,this._lastEffectiveFingerprint=null}get cachedValue(){return!this.readOnly&&this._node?this._node._value:this._cachedValue}set cachedValue(e){!this.readOnly&&this._node?this._node.setValue(e,!1):this._cachedValue=e}_computeEffectiveFingerprint(e){return JSON.stringify(Object.entries(e).sort())}_buildEffectiveKw(){let e={...this._kw};if(this._node&&this._node.attr)for(let t of Object.keys(this._kw))Object.hasOwn(this._node.attr,t)&&(e[t]=this._node.attr[t]);return e}resolve(e={}){let{static:t=!1,...n}=e;if(t)return this._node?this._node._value:this.cachedValue;let i=this._buildEffectiveKw();if(Object.keys(n).length>0)return this._load({...i,...n},s=>this._prepareValue(s));let a=this._computeEffectiveFingerprint(i);return a===this._lastEffectiveFingerprint&&!this.expired?this.cachedValue:(this._lastEffectiveFingerprint=a,this._load(i,s=>this._finalize(s)))}_load(e,t){let n=bf(this),i=()=>this.load(e);if(n)return yf(i,n).then(t);let a=i();return a&&typeof a.then=="function"?a.then(t):t(a)}_finalize(e){return e=this._prepareValue(e),this._lastUpdate=Date.now(),(!this.readOnly||this.cacheTime!==0)&&(this.cachedValue=e),e}_prepareValue(e){let t;return this._asBag===!0?t=!0:this._asBag===!1?t=!1:t=!this._readOnly,t&&e!==null&&e!==void 0&&(e=this._convertToBag(e)),e}_convertToBag(e){let t=r._BagClass;if(!t||e&&typeof e._htraverse=="function")return e;if(typeof e=="string"){if(e=e.trim(),e.startsWith("<")&&t.fromXml)return t.fromXml(e);if((e.startsWith("{")||e.startsWith("["))&&t.fromTytx)return t.fromTytx(e)}return e}static registerBagClass(e){r._BagClass=e}load(e){return null}};se._BagClass=null;var Br=class extends se{static classKwargs={cacheTime:0,readOnly:!1,asBag:!1,retryPolicy:null,callback:null};static classArgs=["callback"];static internalParams=new Set(["cacheTime","readOnly","asBag","retryPolicy","callback"]);constructor(e={}){typeof e=="function"&&(e={callback:e}),super(e),this._callback=e.callback||null}load(e){return this._callback?this._callback.call(this,e):null}};var Xe=class r{constructor(e,t,n=null,i=null,a=null,s=null,o=null,l=!0){this.label=t,this._value=null,this._attr={},this._parentBag=null,this._resolver=null,this._nodeSubscribers={},this._onChangedValue=null,this.nodeTag=s,this.xmlTag=o,this._compiled=null,this.parentBag=e,i&&this.setAttr(i,!1,!0,l),n!==null&&this.setValue(n,!1),a&&(this.resolver=a)}get parentBag(){return this._parentBag}set parentBag(e){e===null&&this._value?.parentNode===this&&this._value.setBackref(),this._parentBag=e,e?.backref&&this._value&&typeof this._value._htraverse=="function"&&this._value.setBackref(this,e)}get value(){return this.getValue()}set value(e){this.setValue(e)}getValue(e=!1,t=null,n={}){if(t!==null){let i=ae(`${t}::QS`);if(Array.isArray(i)){let a=i.length?i:Object.keys(this._attr),s=a.map(l=>{let u=this.getAttr(l);return!e&&u instanceof se?u.resolve():u}),o=l=>i.length===0?Object.fromEntries(a.map((u,c)=>[u,l[c]])):l.length===1?l[0]:l;return s.some(l=>l&&typeof l.then=="function")?Promise.all(s).then(o):o(s)}else{if(!this._resolver)throw new Error("Cannot use kwargs syntax without resolver");n={...n,...i}}}return this._resolver!==null?this._resolver.resolve({static:e,...n}):this._value}setValue(e,t=!0,n=null,i=null,a=!0,s=null,o=!1){e instanceof se?(this.resolver=e,e=null):e instanceof r&&(n=n||{},Object.assign(n,e._attr),e.resolver&&(this.resolver=e.resolver),e=e._value);let l=this._value;l!==e&&l?.parentNode===this&&l.setBackref(),this._value=e;let u=l!==this._value,c=t??!0,d=null;if(n!==null){let p={...this._attr};this.setAttr(n,!1,i,a);let h=this._buildAttrDiff(p,this._attr);d=Object.keys(h).length>0?h:null}t=c&&(u||d!==null);let f=d?u?"upd_value_attr":"upd_attrs":"upd_value";if(this._onChangedValue&&this._onChangedValue(this,e,l,c),t){let p=d!==null?{oldvalue:l,attrs_diff:d}:{oldvalue:l};for(let h of Object.values(this._nodeSubscribers))h({node:this,info:p,evt:f})}this._parentBag!==null&&this._parentBag.backref&&(e&&typeof e._htraverse=="function"&&e.setBackref(this,this._parentBag),t&&this._parentBag._onNodeChanged(this,[this.label],f,l,d,s,o))}replace(e){if(!(e instanceof r))throw new TypeError("BagNode.replace expects a BagNode");if(e===this)return this;let t=e.staticValue;t&&typeof t._htraverse=="function"&&(t=t.createChildBag().replace(t));let n=null;e.resolver&&(n=Object.create(Object.getPrototypeOf(e.resolver),Object.getOwnPropertyDescriptors(e.resolver)),n._node=null,n._kw={...e.resolver._kw});let i=this._value,a={...this._attr},s=this.resolver;s&&s._node===this&&(s._node=null),this.resolver=n,this.setValue(t,!1,{...e.attr},!1,!1,null);let o=this._buildAttrDiff(a,this._attr),l=Object.keys(o).length?o:null,u=i!==t||s!==n;if(u||l){let c=l?u?"upd_value_attr":"upd_attrs":"upd_value",d=l?{oldvalue:i,attrs_diff:l}:{oldvalue:i};for(let f of Object.values(this._nodeSubscribers))f({node:this,info:d,evt:c});this._parentBag!==null&&this._parentBag.backref&&this._parentBag._onNodeChanged(this,[this.label],c,i,l)}return this}get staticValue(){return this._value}set staticValue(e){this._value=e}get resolver(){return this._resolver}set resolver(e){this._resolver=e,e&&e.setNode&&e.setNode(this)}resetResolver(){if(!this._resolver)throw new Error("Cannot reset resolver: node has no resolver");this._resolver.reset(),this.setValue(null)}get attr(){return this._attr}getAttr(e=null,t=null){return e?e in this._attr?this._attr[e]:t:this._attr}_buildAttrDiff(e,t){let n={},i=new Set([...Object.keys(e),...Object.keys(t)]);for(let a of i){let s=a in e?e[a]:null,o=a in t?t[a]:null;s!==o&&(n[a]={old:s,new:o})}return n}setAttr(e=null,t=!0,n=!0,i=!0){let a=e||{},s=Object.keys(this._nodeSubscribers).length>0,l=t&&(s||this._parentBag!==null&&this._parentBag.backref)?{...this._attr}:null;if(n?Object.assign(this._attr,a):this._attr={...a},i)for(let u of Object.keys(this._attr))this._attr[u]===null&&delete this._attr[u];if(t&&l!==null){let u=this._buildAttrDiff(l,this._attr);if(Object.keys(u).length>0&&s)for(let c of Object.values(this._nodeSubscribers))c({node:this,info:{attrs_diff:u},evt:"upd_attrs"});if(Object.keys(u).length>0&&this._parentBag!==null&&this._parentBag.backref){let c=t===!0?"true":String(t);this._parentBag._onNodeChanged(this,[this.label],"upd_attrs",null,u,c)}}}delAttr(...e){for(let t of e)if(typeof t=="string"&&t.includes(","))for(let n of t.split(","))delete this._attr[n.trim()];else delete this._attr[t]}hasAttr(e,t=null){return e in this._attr?t!==null?this._attr[e]===t:!0:!1}getInheritedAttributes(){let e={};return this._parentBag&&this._parentBag.parentNode&&(e=this._parentBag.parentNode.getInheritedAttributes()),{...e,...this._attr}}subscribe(e,t){this._nodeSubscribers[e]=t}unsubscribe(e){delete this._nodeSubscribers[e]}get compiled(){return this._compiled||(this._compiled={}),this._compiled}get isBranch(){return this._value!=null&&typeof this._value._htraverse=="function"}get position(){return this._parentBag===null?null:this._parentBag._nodes.index(this.label)}get fullpath(){if(this._parentBag!==null){let e=this._parentBag.fullpath;return e?`${e}.${this.label}`:this.label}return null}get parentNode(){return this._parentBag?this._parentBag.parentNode:null}attributeOwnerNode(e,t=null){let n=this;if(t===null)for(;n&&!(e in n._attr);)n=n.parentNode;else for(;n&&n._attr[e]!==t;)n=n.parentNode;return n}asTuple(){return[this.label,this.value,this._attr,this._resolver||null]}isEqual(e){if(!(e instanceof r)||this.label!==e.label)return!1;let t=Object.keys(this._attr),n=Object.keys(e._attr);if(t.length!==n.length)return!1;for(let i of t)if(this._attr[i]!==e._attr[i])return!1;return this._resolver!==null?this._resolver===e._resolver:this._value&&typeof this._value.equalTo=="function"?this._value.equalTo(e._value):this._value&&typeof this._value.isEqual=="function"?this._value.isEqual(e._value):this._value===e._value}diff(e){if(this.label!==e.label)return`Other label: ${e.label}`;let t=Object.keys(this._attr),n=Object.keys(e._attr);return t.length!==n.length||t.some(i=>this._attr[i]!==e._attr[i])?`attributes self:${JSON.stringify(this._attr)} --- other:${JSON.stringify(e._attr)}`:this._value!==e._value?`value self:${this._value} --- other:${e._value}`:null}toJson(e=!0){let t=this.value;return t&&typeof t.toJson=="function"&&(t=t.toJson(e,!0)),{label:this.label,value:t,attr:this._attr}}toString(){return`BagNode : ${this.label}`}};var Or=class r{constructor(){this._dict=Object.create(null),this._list=[],this._parentBag=null}index(e){if(e in this._dict)return this._list.findIndex(n=>n.label===e);let t=e.match(/^#(\d+)$/);if(t){let n=parseInt(t[1],10);return n<this._list.length?n:-1}if(t=e.match(/^#(\w*)=(.*)$/),t){let[,n,i]=t,a=i.includes("::")?ae(i):i;return n?this._list.findIndex(s=>s.getAttr(n)===a):this._list.findIndex(s=>s._value===a)}return-1}_parsePosition(e){let t=this._list.length;if(e==null||e===">")return t;if(typeof e=="number")return e<0&&(e=t+e),Math.max(0,Math.min(e,t));if(e==="<")return 0;if(e.startsWith("#")){let n=this._parseSharpIndex(e.slice(1),e);return Math.min(n,t)}if(e.startsWith("<")){let n=e.slice(1);if(n.startsWith("#")){let a=this._parseSharpIndex(n.slice(1),e);return Math.min(a,t)}let i=this.index(n);if(i<0)throw new Error(`Invalid node_position '${e}': label '${n}' not found`);return i}if(e.startsWith(">")){let n=e.slice(1);if(n.startsWith("#")){let a=this._parseSharpIndex(n.slice(1),e);return Math.min(a+1,t)}let i=this.index(n);if(i<0)throw new Error(`Invalid node_position '${e}': label '${n}' not found`);return i+1}throw new Error(`Invalid node_position '${e}': unrecognized syntax`)}_parseSharpIndex(e,t){if(!/^-?\d+$/.test(e))throw new Error(`Invalid node_position '${t}': '${e}' is not an integer`);let n=parseInt(e,10);if(n<0)throw new Error(`Invalid node_position '${t}': negative index not allowed in '#n' syntax`);return n}get(e){if(typeof e=="number")return e>=0&&e<this._list.length?this._list[e]:null;if(e.startsWith("#")){let t=this.index(e);return t>=0?this._list[t]:null}return this._dict[e]||null}set(e,t,n=">",i=null,a=null,s=null,o=!1,l=!0,u=null,c=!0,d=!1,f=null){let p=null;if(e.includes("?")&&([e,p]=e.split("?",2)),e==null||e.startsWith("#"))throw new Error("Cannot create new node with #n syntax");if(p){let m=p.split("&");if(m.length===1)i={[m[0]]:t};else{if(!Array.isArray(t)||t.length!==m.length)throw new Error("Wrong attributes assignment");i={};for(let g=0;g<m.length;g++)i[m[g]]=t[g]}t=null}let h=this._dict[e];if(h)f&&(h.nodeTag=f),s!==null&&(s===!1?h.resolver=null:h.resolver=s),p?h.setAttr(i,c,!0,l):h.setValue(t,c,i,o,l,u,d);else{let m=a&&a.nodeClass?a.nodeClass:Xe;h=new m(a,e,p?null:t,i,s,f,null,l);let g=this._parsePosition(n);this._dict[e]=h,this._list.splice(g,0,h),c&&a&&a.backref&&a._onNodeInserted(h,g,null,u,d)}return d&&h.setValue(null,!1),h}pop(e){let t=this.get(e);if(t){delete this._dict[t.label];let n=this._list.indexOf(t);return n>=0&&this._list.splice(n,1),t}return null}has(e){return e in this._dict}get length(){return this._list.length}clear(){this._dict=Object.create(null),this._list=[]}keys(){return this._list.map(e=>e.label)}values(){return this._list.map(e=>e.getValue())}items(){return this._list.map(e=>[e.label,e.getValue()])}[Symbol.iterator](){return this._list[Symbol.iterator]()}move(e,t,n=!0){if(t<0)return;let i=Array.isArray(e)?e:[e];if(i.length===0||t>=this._list.length)return;let a=this._list[t].label;if(i.length>1){let s=[...i].sort((c,d)=>c-d),o=s[0]<t?1:0,l=[];for(let c=s.length-1;c>=0;c--){let d=s[c];if(d>=0&&d<this._list.length){let f=this._list[d];this._list.splice(d,1),l.push(f),n&&this._parentBag&&this._parentBag.backref&&this._parentBag._onNodeDeleted(f,d)}}let u=this.index(a);u<0&&(u=this._list.length),u+=o;for(let c of l)this._list.splice(u,0,c),n&&this._parentBag&&this._parentBag.backref&&this._parentBag._onNodeInserted(c,u)}else{let s=i[0];if(s===t||s<0||s>=this._list.length)return;let o=this._list[s];this._list.splice(s,1),n&&this._parentBag&&this._parentBag.backref&&this._parentBag._onNodeDeleted(o,s),this._list.splice(t,0,o),n&&this._parentBag&&this._parentBag.backref&&this._parentBag._onNodeInserted(o,t)}}isEqual(e){if(!(e instanceof r)||this._list.length!==e._list.length)return!1;for(let t=0;t<this._list.length;t++){let n=this._list[t],i=e._list[t];if(!n.isEqual(i))return!1}return!0}};var ko=ba(Ui(),1);var Zi="::RSLV:",vf=new Map,xf=new Map,Rn=new WeakMap,K=class extends Error{constructor(e){super(e),this.name="BagSerializationError"}},Mr=class extends se{constructor(e){super({asBag:!1}),Rn.set(this,e)}get payload(){return Rn.get(this)}load(){throw new K("This resolver is opaque; local execution is unavailable")}};function vo(r){if(!r||typeof r!="object"||Array.isArray(r)||typeof r.resolver_module!="string"||typeof r.resolver_class!="string"||!Array.isArray(r.args??[])||!r.kwargs||typeof r.kwargs!="object"||Array.isArray(r.kwargs))throw new K("Invalid resolver description")}function xo(r,e=new Set){if(!(r===null||typeof r=="string"||typeof r=="boolean")&&!(typeof r=="number"&&Number.isFinite(r))){if(typeof r!="object"||e.has(r)||!Array.isArray(r)&&Object.getPrototypeOf(r)!==Object.prototype&&Object.getPrototypeOf(r)!==null)throw new K("Resolver parameters must be JSON data; callbacks cannot travel");e.add(r);for(let t of Object.values(r))xo(t,e);e.delete(r)}}function Rr(r){if(Rn.has(r))return Rn.get(r);let e=xf.get(r.constructor);if(!e)throw new K(`Unregistered resolver: ${r.constructor.name}`);let t=e.encode(r),n={resolver_module:e.module,resolver_class:e.name,args:t.args??[],kwargs:t.kwargs??{}};return vo(n),xo(n),Zi+JSON.stringify(n)}function Ln(r){if(typeof r!="string"||!r.startsWith(Zi))return null;let e=r.slice(Zi.length);if(/^[A-Za-z0-9_-]+\.[A-Za-z0-9_-]*\.[A-Za-z0-9_-]+$/.test(e))return new Mr(r);let t;try{t=JSON.parse(e)}catch{throw new K("Invalid resolver JSON or signed token")}vo(t);let n=vf.get(JSON.stringify([t.resolver_module,t.resolver_class]));if(!n)return new Mr(r);let i=n.decode({args:t.args??[],kwargs:t.kwargs});if(!(i instanceof n.cls))throw new K("Resolver decoder returned an incompatible instance");return i}function Pn(r){return Object.fromEntries(Object.entries(r||{}).map(([e,t])=>[e,t instanceof se?Rr(t):t]))}function Ji(r){return Object.fromEntries(Object.entries(r||{}).map(([e,t])=>[e,Ln(t)??t]))}var Be="__cls";function Kt(r,e){return r!==null&&r.tytxSuffix===e?r:Sr(e)}function Ef(r){let e=r.tytxSuffix,t=Object.entries(Ge(e)).filter(([,n])=>n===r).map(([n])=>n);if(t.length===0)throw new K(`${r.name} is not in the TYTX subtype dictionary of '${e}'`);if(t.length>1)throw new K(`${r.name} is in the TYTX subtype dictionary of '${e}' under several names: ${t.sort().join(", ")}`);return t[0]}function Ki(r,e){let t=Ge(r);if(!Object.hasOwn(t,e))throw new K(`Unknown Bag class '${e}' for TYTX type '${r}'`);return t[e]}function Qi(r,e){return r===e?null:Ef(r)}function*Ao(r,e=[]){for(let t of r){let n=[...e,t.label];yield[n,t];let i=t.getValue(!0);!t.resolver&&i instanceof le&&(yield*Ao(i,n))}}function kf(r){let e=r.toISOString(),t=r.getUTCFullYear()===1970&&r.getUTCMonth()===0&&r.getUTCDate()===1,n=r.getUTCHours()===0&&r.getUTCMinutes()===0&&r.getUTCSeconds()===0&&r.getUTCMilliseconds()===0;if(n&&!t)return e.slice(0,e.indexOf("T"));let i=e.replace(/\.000Z$/,"Z");return t&&!n?i.slice(i.indexOf("T")+1):i}function Qt(r){if(r===null||typeof r!="object")return!1;let e=Object.getPrototypeOf(r);return e===Object.prototype||e===null}function ft(r){return typeof r=="string"?r.includes("::")?`${r}::T`:r:Array.isArray(r)?r.map(ft):Qt(r)?Object.fromEntries(Object.entries(r).map(([e,t])=>[e,ft(t)])):r}function ea(r){if(!Qt(r))throw new TypeError("Bag options must be an object");let{recursive:e=!0}=r;if(typeof e!="boolean")throw new TypeError("recursive must be a boolean");return e}var Eo=!1,le=class r{static tytxSuffix="X";constructor(e=null,t={}){this._nodes=new Or,this._backref=!1,this._parent=null,this._parentNode=null,this._rootAttributes=null,this._updSubscribers={},this._insSubscribers={},this._delSubscribers={},ea(t),e!=null&&this.fillFrom(e,t)}get parent(){return this._parent}set parent(e){this._parent=e}get parentNode(){return this._parentNode}set parentNode(e){this._parentNode=e}get backref(){return!!this._backref}get nodeClass(){return Xe}createChildBag(){return new this.constructor}get fullpath(){if(this._parent!==null&&this._parentNode!==null){let e=this._parent.fullpath;return e?`${e}.${this._parentNode.label}`:this._parentNode.label}return null}relativePath(e){let t=[],n=e;for(;n!==null;){if(n.parentBag===this)return t.push(n.label),t.reverse(),t.join(".");t.push(n.label),n=n.parentNode}return null}get length(){return this._nodes.length}get root(){let e=this;for(;e.parent!==null;)e=e.parent;return e}get attributes(){return this._parentNode!==null?this._parentNode.getAttr():{}}get rootAttributes(){return this._rootAttributes}set rootAttributes(e){this._rootAttributes=e!==null?{...e}:null}_htraverseBefore(e){let t=this,n;for(typeof e=="string"?(e=e.replace(/\.\.\//g,"#parent."),n=e.split(".").filter(i=>i)):n=[...e];n.length&&n[0]==="#parent"&&t!==null;)n.shift(),t=t.parent;return[t,n]}_htraverse(e,t=!1,n=!0){let[i,a]=this._htraverseBefore(e);if(i===null)return[null,null];if(a.length===0)return[i,""];for(;a.length>1&&i instanceof r;){let s=a[0];if(s==="#parent"){if(i.parent===null||i.parent===void 0)break;a.shift(),i=i.parent;continue}let o=i._nodes.get(s);if(!o)break;let l=o.getValue(n);if(l instanceof r)a.shift(),i=l;else if(t){let u=i.createChildBag();o.setValue(u,!0,null,!0,!0,"autocreate"),a.shift(),i=u}else break}if(!t)return a.length>1?[null,null]:[i,a[0]];for(;a.length>1;){let s=a.shift();if(s.startsWith("#"))throw new Lr("Not existing index in #n syntax");let o=i.createChildBag();i._nodes.set(s,o,">",null,i,null,!1,!0,"autocreate"),i=o}return[i,a[0]]}get(e,t=null,n=!0,i={}){if(!e)return this;if(e==="#parent")return this.parent;let a=null;e.includes("?")&&([e,a]=e.split("?",2));let s=this._nodes.get(e);return s?s.getValue(n,a,i):t}getItem(e,t=null,n=!1,i={}){if(!e)return this;let[a,s]=this._htraverse(e,!1,n);return a instanceof r?a.get(s,t,n,i):t}setItem(e,t,n=null,i=">",a=!1,s=!0,o=null,l=!1,u=!0,c=null,d=null){if(e==="")throw new RangeError("setItem requires a non-empty path");let[f,p]=this._htraverse(e,!0);return f._nodes.set(p,t,i,n,f,c,a,s,o,u,l,d)}_pop(e,t=null){let n=this._nodes.index(e);if(n>=0){let i=this._nodes.pop(n);return this.backref&&this._onNodeDeleted(i,n,null,t),i}return null}pop(e,t=null,n=null){let i=this.popNode(e,n);return i?i.value:t}delItem(e,t=null,n=null){return this.pop(e,t,n)}popNode(e,t=null){let[n,i]=this._htraverse(e,!1,!0);if(!n||!i)return null;let a=n._nodes.get(i);if(!a)return null;try{return n._pop(i,t)}finally{a.parentBag===n&&n._nodes._dict[a.label]!==a&&(a.parentBag=null)}}clear(){let e=[...this._nodes];this._nodes.clear(),this.backref&&this._onNodeDeleted(e,-1);for(let t of e)t.parentBag=null}getNode(e,t=!0,n=!1,i=null){if(e==null||e==="")return this.parentNode;if(typeof e=="number")return this._nodes.get(e);typeof e=="string"&&(e=e.split("?",1)[0]);let[a,s]=this._htraverse(e,n,t);if(a instanceof r&&s){let o=a._nodes.get(s);if(o)return o;if(n)return a._nodes.set(s,i,">",null,a,null,!1,!0,"autocreate"),a._nodes.get(s)}return null}setBackref(e=null,t=null){let n=this._backref;if(this._backref=!0,this._parent=t,this._parentNode=e,!n){this._nodes._parentBag=this;for(let i of this)i.parentBag=this}}delParentRef(){this._parent=null,this._parentNode=null,this._backref=!1}clearBackref(){if(this._backref){this._backref=!1,this._parent=null,this._parentNode=null,this._nodes._parentBag=null;for(let e of this){e.parentBag=null;let t=e.getValue(!0);t instanceof r&&t.clearBackref()}}}_onNodeChanged(e,t,n,i=null,a=null,s=null,o=!1){for(let l of Object.values(this._updSubscribers))l({node:e,pathlist:t,oldvalue:i,attrs_diff:a,evt:n,reason:s,fired:o});this._parent&&this._parentNode&&this._parent._onNodeChanged(e,[this._parentNode.label,...t],n,i,a,s,o)}_onNodeInserted(e,t,n=null,i=null,a=!1){let s=e.parentBag,o=e.getValue(!0);s!==null&&s.backref&&o instanceof r&&o.setBackref(e,s),n===null&&(n=[]);for(let l of Object.values(this._insSubscribers))l({node:e,pathlist:n,ind:t,evt:"ins",reason:i,fired:a});this._parent&&this._parentNode&&this._parent._onNodeInserted(e,t,[this._parentNode.label,...n],i,a)}_onNodeDeleted(e,t,n=null,i=null){for(let a of Object.values(this._delSubscribers))a({node:e,pathlist:n,ind:t,evt:"del",reason:i});this._parent&&this._parentNode&&(n===null&&(n=[]),this._parent._onNodeDeleted(e,t,[this._parentNode.label,...n],i))}_subscribe(e,t,n){n!=null&&(t[e]=n)}subscribe(e,t={}){if(Object.hasOwn(t,"timer")||Object.hasOwn(t,"interval"))throw new TypeError("Timer subscriptions were removed. Schedule polling in the application.");let{update:n=null,insert:i=null,delete:a=null,any:s=null}=t;this.backref||this.setBackref(),this._subscribe(e,this._updSubscribers,n||s),this._subscribe(e,this._insSubscribers,i||s),this._subscribe(e,this._delSubscribers,a||s)}unsubscribe(e,t={}){if(Object.hasOwn(t,"timer")||Object.hasOwn(t,"interval"))throw new TypeError("Timer subscriptions were removed. Schedule polling in the application.");let{update:n=!1,insert:i=!1,delete:a=!1,any:s=!1}=t;(n||s)&&delete this._updSubscribers[e],(i||s)&&delete this._insSubscribers[e],(a||s)&&delete this._delSubscribers[e]}[Symbol.iterator](){return this._nodes[Symbol.iterator]()}keys(){return this._nodes.keys()}values(){return this._nodes.values()}items(){return[...this._nodes].map(e=>({key:e.label,value:e.getValue()}))}get nodes(){return this.getNodes()}node(e){return this._nodes.get(e)}setAttr(e=null,t=null,n=!0){let i=r.prototype.getNode.call(this,e,!0,!0);i&&i.setAttr(t,!0,!0,n)}getAttr(e=null,t=null,n=null){let i=this.getNode(e);return i?i.getAttr(t,n):n}delAttr(e=null,...t){let n=this.getNode(e);n&&n.delAttr(...t)}getInheritedAttributes(){return this._parentNode?this._parentNode.getInheritedAttributes():{}}getNodes(e=null){return e?[...this._nodes].filter(t=>e(t)):[...this._nodes]}getNodeByValue(e,t){for(let n of this._nodes){let i=n.value;if(i instanceof r){if(i.getItem(e)===t)return n}else if(i&&i.get&&i.get(e)===t)return n}return null}getNodeByAttr(e,t,n=!1,i=!1){let a=t===void 0,s=n&&typeof t=="string"?t.toLowerCase():t,o=l=>{let u=[];for(let c of l._nodes){if(e in c.attr){let d=n&&typeof c.attr[e]=="string"?c.attr[e].toLowerCase():c.attr[e];if(a||d==s)return c}if(c._value instanceof r)if(i){let d=o(c._value);if(d)return d}else u.push(c._value)}for(let c of u){let d=o(c);if(d)return d}return null};return o(this)}isEmpty(e=!1,t=!1){if(this._nodes.length===0)return!0;for(let n of this._nodes){if(n._resolver!==null)return!1;let i=n.getValue(!0);if(i!=null&&!(e&&i===0)&&!(t&&i===""))return!1}return!0}query(e=null,t=null,n=!1,i=!1,a=!0,s=!0,o=null,l=!0){e||(e="#k,#v,#a");let u=this,c;if(typeof e=="string"){if(e.includes(":")){let[p,h]=e.split(":");u=this.getItem(p),e=h}c=e.split(",").map(p=>p.trim())}else c=e;let d=(p,h,m,g,b)=>{if(h==="#k")return p.label;if(h==="#p")return m;if(h==="#n")return p;if(typeof h=="function")return h(p);if(h==="#v"){let y=b();return g&&y instanceof r?null:y}else if(h.startsWith("#v.")){let y=h.split(".").slice(1).join("."),v=b();return v&&v.getItem?v.getItem(y):null}else{if(h==="#__v")return p.getValue(!0);if(h.startsWith("#a")){let y=h.includes(".")?h.split(".").slice(1).join("."):null;return p.getAttr(y)}else{let y=b();return y&&y.getItem?y.getItem(h):null}}};function*f(){let p=0;function*h(m,g){for(let b of m._nodes){let y=g?`${g}.${b.label}`:b.label,v=!1,w,D=()=>(v||(w=b.getValue(l),v=!0),w);if((a&&s||(D()instanceof r?s:a))&&(t===null||t(b))&&(yield c.length===1?d(b,c[0],y,i,D):c.map($=>d(b,$,y,i,D)),p++,o!==null&&p>=o))return;if(i){let $=D();if($ instanceof r&&(yield*h($,y),o!==null&&p>=o))return}}}yield*h(u,"")}return n?f():[...f()]}getLeaves(){let e=[],t=(n,i)=>{for(let a of n._nodes){let s=i?`${i}.${a.label}`:a.label,o=a.getValue(!1);o instanceof r?t(o,s):e.push([s,o])}};return t(this,""),e}digest(e=null,t=null,n=!1){typeof t=="boolean"&&(console.warn("Bag.digest(what, asColumns) is deprecated; use digest(what, null, asColumns)."),n=t,t=null);let i=this.query(e,t,!1,!1,!0,!0,null,!1);if(n){if(!i||i.length===0)return(typeof e=="string"?e:"#k,#v,#a").split(",").map(l=>l.trim()).map(()=>[]);let a=[...i];if(a.length&&Array.isArray(a[0])){let s=a[0].length,o=[];for(let l=0;l<s;l++)o.push(a.map(u=>u[l]));return o}return[a]}return[...i]}columns(e,t=!1){typeof e=="string"&&(e=e.split(","));let n=t?"#a.":"",i=e.map(a=>`${n}${a}`).join(",");return this.digest(i,null,!0)}sum(e="#v",t=!1,n=null){if(t!=null&&typeof t!="boolean")throw new TypeError("sum strict must be a boolean; pass condition as the third argument");if(n!=null&&typeof n!="function")throw new TypeError("sum condition must be callable; deep is no longer supported");let i=a=>{let s=0,o=!1;for(let l of this.query(a,n)){if(l==null||l===""){o=!0;continue}if(typeof l!="number"&&typeof l!="boolean"){if(t)throw new TypeError(`sum encountered non-numeric value: ${typeof l}`);continue}s+=l}return t&&o?null:s};return e.includes(",")?e.split(",").map(a=>i(a.trim())):i(e)}sort(e="#k:a"){let t=(i,a)=>i==null?[-1,""]:a&&typeof i=="string"?[0,i.toLowerCase()]:[0,i],n=(i,a)=>i[0]!==a[0]?i[0]-a[0]:i[1]<a[1]?-1:i[1]>a[1]?1:0;if(typeof e=="function")this._nodes._list.sort((i,a)=>{let s=e(i),o=e(a);return s<o?-1:s>o?1:0});else{let i=e.split(",");i.reverse();for(let a of i){let s,o;a.includes(":")?[s,o]=a.split(":",2):(s=a,o="a"),s=s.trim(),o=o.trim();let l=o==="d"||o==="D",u=o==="a"||o==="d",c;if(s.toLowerCase()==="#k")c=d=>t(d.label,u);else if(s.toLowerCase()==="#v")c=d=>t(d.value,u);else if(s.toLowerCase().startsWith("#a.")){let d=s.slice(3);c=f=>t(f.getAttr(d),u)}else c=d=>{let f=d.value,p=f instanceof r?f.getItem(s):f?f[s]:null;return t(p,u)};this._nodes._list.sort((d,f)=>{let p=n(c(d),c(f));return l?-p:p})}}return this}equalTo(e){return e instanceof r?this._nodes.isEqual(e._nodes):!1}has(e){if(typeof e=="string"){let t=null;e.includes("?")&&([e,t]=e.split("?",2));let n=this.getNode(e);return n===null?!1:t===null?!0:t.split("&").every(i=>i in n.attr)}else if(e&&e.label!==void 0)return[...this._nodes].includes(e);return!1}getResolver(e){let t=this.getNode(e);return t?t.resolver:null}setResolver(e,t){let n=this.getNode(e);n||(this.setItem(e,null),n=this.getNode(e)),n.resolver=t}setCallbackItem(e,t,n={}){let i=new Br({callback:t,...n});this.setResolver(e,i)}move(e,t,n=!0){this._nodes.move(e,t,n)}asDict(e=!1,t=!1,n=!1,i=!1){let a={};for(let s of this._nodes){let o=s.value;if(i&&o==null)continue;let l=s.label;e&&(l=String(l)),t&&(l=l.toLowerCase()),n&&o instanceof r&&(o=r.prototype.asDict.call(o,e,t,n,i)),Object.defineProperty(a,l,{value:o,enumerable:!0,writable:!0,configurable:!0})}return a}setdefault(e,t=null){let n=this.getNode(e);return n?n.value:(this.setItem(e,t),t)}deepcopy(e=!1){let t=this.createChildBag();for(let n of this._nodes){let i=n.getValue(!e);i instanceof r&&(i=i.deepcopy(e));let a=new t.nodeClass(t,n.label,i);a.setAttr({...n.attr},!1,!1,!1),a.nodeTag=n.nodeTag,a.xmlTag=n.xmlTag,t._nodes._list.push(a),t._nodes._dict[a.label]=a}return t}update(e,t=null,n=null,i=!1){if(!(e instanceof r)){for(let a in e){let s=e[a];(!i||s!==null||!this._nodes.has(a))&&this.setItem(a,s,null,">",!1,!1,n,!1,n!==!1)}return}for(let a of[...e]){let s=a.label,o=t==="static"?a.resolver:null,l=o?null:a.getValue(),u=a.attr.__replace;delete a.attr.__replace;let c=this._nodes.get(s);if(c)if(c.setAttr(a.attr,n===null?!0:n,!0,!1),a.nodeTag!=null&&(c.nodeTag=a.nodeTag),a.xmlTag!=null&&(c.xmlTag=a.xmlTag),o)c.resolver=o,c.setValue(null,n===null?!0:n,null,null,!1,n);else{a.resolver&&(c.resolver=null);let d=c.getValue();l instanceof r&&d instanceof r&&!u?d.update(l,t,n,i):(!i||l!==null)&&c.setValue(l,n===null?!0:n,null,null,!1,n)}else{let d=this.setItem(s,o||l,a.attr,">",!1,!1,n,!1,n!==!1);d.nodeTag=a.nodeTag,d.xmlTag=a.xmlTag}}}_fillFromBag(e){this.clear();for(let t of e){let n=new this.nodeClass(this,t.label);n.replace(t),n.nodeTag=t.nodeTag,n.xmlTag=t.xmlTag,this._nodes._list.push(n),this._nodes._dict[n.label]=n}}_appendLiteral(e,t,n=null,i=null,a=null){if(typeof e!="string")throw new TypeError("Bag labels must be strings");let s=new this.nodeClass(this,e,null,n,i,a,null,!1);return t instanceof se?s.resolver=t:s._value=t,this._nodes._dict[e]=s,this._nodes._list.push(s),s}fillFrom(e=null,t={}){let n=ea(t);if(e!=null&&!Qt(e)&&!Array.isArray(e))throw new TypeError("Bag source must be a dictionary, array or null");let i=this.createChildBag(),a=new Set,s=(o,l,u)=>{if(a.has(l))throw new TypeError(`Cyclic Bag source at ${u}`);a.add(l);try{let c=Array.isArray(l)?String(l.length).length+1:0,d=Array.isArray(l)?Array.from(l,(f,p)=>[`r_${String(p).padStart(c,"0")}`,f]):Object.entries(l);if(!Array.isArray(l)&&Object.getOwnPropertySymbols(l).some(f=>Object.prototype.propertyIsEnumerable.call(l,f)))throw new TypeError(`Bag labels must be strings at ${u}`);for(let[f,p]of d){let h=p;n&&(Qt(h)||Array.isArray(h))&&(h=this.createChildBag(),s(h,p,`${u}[${JSON.stringify(f)}]`)),o._appendLiteral(f,h)}}finally{a.delete(l)}};return e!=null&&s(i,e,"$"),this._replacePrepared(i)}_loadSource(e,t={}){return this.fillFrom(e,t)}replace(e){if(!(e instanceof r))throw new TypeError("Bag.replace expects a Bag");if(e===this)return this;let t=this.createChildBag();return t._fillFromBag(e),this._replacePrepared(t)}_replacePrepared(e){for(let n of this._nodes){n.parentBag=null;let i=n.getValue(!0);i instanceof r&&i.clearBackref()}let t=this._nodes;this._nodes=e._nodes,e._nodes=t,this._nodes._parentBag=this.backref?this:null,e._nodes._parentBag=null;for(let n of this._nodes)n.parentBag=this;for(let n of e._nodes)n._parentBag=e;return this.backref&&this.parent&&this.parentNode&&this.parent._onNodeChanged(this.parentNode,[this.parentNode.label],"upd_value",e),this}forEach(e,{static:t=!0,deep:n=!1,kwargs:i={}}={}){if(typeof e!="function")throw new TypeError("forEach requires a callback");let a=(s,o)=>{for(let l=0;l<s._nodes.length;l++){let u=s._nodes._list[l],c={...o};"_pathlist"in o&&(c._pathlist=[...o._pathlist,u.label]),"_indexlist"in o&&(c._indexlist=[...o._indexlist,l]);let d=e(u,c,l);if(d)return d;if(d==null&&n){let f=u.getValue(t);if(f instanceof r){let p=a(f,c);if(p)return p}}}return null};return a(this,i)}*traverse(){for(let e of this._nodes){yield e;let t=e.getValue(!0);t instanceof r&&(yield*t.traverse())}}*_iterNodesWithPaths(e=!0,t=""){for(let n of this._nodes){let i=t?`${t}.${n.label}`:n.label;yield[i,n];let a=n.getValue(e);a instanceof r&&(yield*a._iterNodesWithPaths(e,i))}}*_nodeFlattener(e=null){let t=e!==null,n=t?Object.create(null):null,i=0,a=new Map([["[]",this.constructor]]);for(let[s,o]of Ao(this)){let l=s.slice(0,-1),u=JSON.stringify(s),c=JSON.stringify(l),d=o.getValue(!0),f,p=null;if(o.resolver)f=Rr(o.resolver);else if(d instanceof r){let g=d.constructor,b=g.tytxSuffix;a.set(u,g),p=Qi(g,Kt(a.get(c),b)),f=`::${b}`}else d===null?f="::NN":f=ft(d);if(o.attr&&Object.hasOwn(o.attr,Be))throw new K(`node '${s}': the attribute '${Be}' is reserved for the Bag class name`);let h=Pn(ft(o.attr));p!==null&&(h[Be]=p);let m=o.nodeTag;t?(yield[l.length?n[c]:null,o.label,m,f,h],d instanceof r&&(n[u]=i,e[i]=s,i++)):yield[l,o.label,m,f,h]}}toTytx(e="json",t=!1){let n=this._toTytxPayload(t),i=this.constructor.tytxSuffix;if(e==="json")return`${n}::${i}`;if(e==="msgpack")return on(new Se(4,new TextEncoder().encode(`${i}:${n}`)));throw new TypeError(`Unsupported transport: ${e}`)}_toTytxPayload(e=!1){let t;if(e){let a={};t={rows:[...this._nodeFlattener(a)],paths:a}}else t={rows:[...this._nodeFlattener(null)]};let n=this.constructor,i=Qi(n,Kt(null,n.tytxSuffix));return i!==null&&(t[Be]=i),t.rows=t.rows.map(([a,s,o,l,u])=>[ft(a),ft(s),ft(o),l,u]),t.paths&&(t.paths=ft(t.paths)),Ee(t)}static fromTytx(e,t="json",n={}){if(Qt(t)&&(n=t,t="json"),ea(n),typeof e!="string"&&!(e instanceof Uint8Array))throw new TypeError("fromTytx requires serialized text or bytes");if(t!=="json"&&t!=="msgpack")throw new TypeError(`Unsupported transport: ${t}`);t==="json"&&e instanceof Uint8Array&&(e=new TextDecoder().decode(e));let i=ae(e,t==="json"?null:t);if(i instanceof r)return i;if(!Qt(i)&&!Array.isArray(i))throw new TypeError("fromTytx requires a dictionary, array or typed Bag root");return new this(i,n)}static _fromTytxPayload(e){let t=this.tytxSuffix;if(e==="")return new(Kt(null,t));let n=ae(e);if(!n||!Array.isArray(n.rows))throw new K("Invalid TYTX Bag: expected rows");let i=n.paths,a=i!=null,s=Object.hasOwn(n,Be)?Ki(t,n[Be]):Kt(null,t),o=new s,l=new Map([["[]",o]]);for(let u of n.rows){if(!Array.isArray(u)||u.length!==5)throw new K("Invalid TYTX Bag row");let[c,d,f,p,h]=u,m=c??"";if(a){if(c!==null&&!Object.hasOwn(i,c))throw new K(`Unknown TYTX parent reference: ${c}`);m=c===null?"":i[c]}if(typeof m=="string"&&(m=m?m.split("."):[]),!Array.isArray(m))throw new K("Invalid TYTX parent path");let g=JSON.stringify(m);if(!l.has(g))throw new K(`Missing or undecodable TYTX parent branch: ${m}`);let b=l.get(g),y=JSON.stringify([...m,d]),v=p,w=Ln(v),D=Ji(h),A=Object.hasOwn(D,Be)?D[Be]:null;if(delete D[Be],v instanceof r){let R=v.constructor.tytxSuffix,V=A!==null?Ki(R,A):Kt(b.constructor,R);v=new V,l.set(y,v)}else if(A!==null)throw new K(`node '${y}': the attribute '${Be}' is reserved for the Bag class name of a branch`);let $=b._appendLiteral(d,w?null:v,D,w);$.nodeTag=f??null}return o}toXml(e={}){let{pretty:t=!1,encoding:n="UTF-8",docHeader:i=null,selfClosedTags:a=null}=e,s=this._bagToXml(a,t);return i===!0?s=`<?xml version='1.0' encoding='${n}'?>
|
|
16
|
+
${s}`:typeof i=="string"&&(s=`${i}
|
|
17
|
+
${s}`),s}_bagToXml(e=null,t=!1,n=0){let i=[];for(let a of this._nodes)i.push((t?" ".repeat(n):"")+this._nodeToXml(a,e,t,n));return i.join(t?`
|
|
18
|
+
`:"")}_nodeToXml(e,t=null,n=!1,i=0){let a=e.xmlTag||e.nodeTag||e.label,s=this._sanitizeTag(a),o=[];if(s!==a&&o.push(`_tag="${this._escapeAttr(a)}"`),e.resolver&&o.push(`_resolver="${this._escapeAttr(Rr(e.resolver))}"`),e.attr)for(let[f,p]of Object.entries(Pn(e.attr)))p!==null&&p!==!1&&p!==void 0&&o.push(`${f}="${this._escapeAttr(String(p))}"`);let l=o.length?" "+o.join(" "):"",u=e.resolver?null:e.getValue(!0);if(u&&typeof u._bagToXml=="function"){n=n&&e.attr?.["xml:space"]!=="preserve";let f=u._bagToXml(t,n,i+1);return f?n?`<${s}${l}>
|
|
19
19
|
${f}
|
|
20
|
-
${" ".repeat(
|
|
21
|
-
`)}toString(e=!0,t=null,n=""){t||(t=new Set);let
|
|
22
|
-
`)}},Rr=class extends Error{constructor(e){super(e),this.name="BagException"}};se.registerBagClass(le);Ga(le,"X",r=>r._toTytxPayload(),r=>le._fromTytxPayload(r));Sr(le.tytxSuffix,{...Ge(le.tytxSuffix),Bag:le});var ko=new Set(["False","None","True","and","as","assert","async","await","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","nonlocal","not","or","pass","raise","return","try","while","with","yield"]);function Ao(r){return r.endsWith("_")&&ko.has(r.slice(0,-1))?r.slice(0,-1):r}function Do(r){let e=Ao(r);return e!==r?e:r.startsWith("_")&&ko.has(r.slice(1))?r.slice(1):r}function Qa(r,{renderTag:e=null,ns:t=null,dialectName:n=null}={}){let a=e||r;if(!a)return a;if(a=Ao(a),t&&!e){let i=`${n}_`;a.startsWith(i)&&(a=a.slice(i.length)),a=`${t}:${a}`}return a}var tr=Symbol("value"),Co=new Set(["_meta","datapath","nodeId","ns","form","formId","_anchor","updateOn"]);function ei(r){return Object.entries(r||{}).filter(([e])=>!Co.has(e)).map(([e,t])=>[Do(e),t])}var er=class extends Xe{constructor(e,t,n=null,a=null,i=null,s=null,o=null){super(e,t,n,a,i,s,o),this._builder=e?._insertingBuilder??e?._builder??null,this._targetId=null}get builder(){if(this._builder)return this._builder;let e=this.parentBag;return e?e._builder:null}get data(){return this.builder.data}get rootBuilder(){return this.parentBag.root._builder}_getMeta(e){let t=this.getAttr("_meta")||{},n=e.split(",").map(a=>a.trim());return n.length===1?t[n[0]]!==void 0?t[n[0]]:null:n.map(a=>t[a]!==void 0?t[a]:null)}pointerType(e){return typeof e=="string"&&(e[0]==="^"||e[0]==="=")&&!e.startsWith("==")?e[0]:null}pointers(){this.builder.validateCustomTypes(this);let e=[];for(let[t,n]of Object.entries(this.getAttr()||{}))this.pointerType(n)==="^"&&e.push([t,n.split(":",1)[0]]);return this.pointerType(this.value)==="^"&&e.push(["",this.value.split(":",1)[0]]),e}fixedAttrItems(){return ei(this.getAttr())}runtimeToEvaluate(){let e=new Map(this.fixedAttrItems());return e.set(tr,this.value),e}absDatapath(e){let t=e;this.pointerType(e)&&(e=(Qe(e)?.pointer??e).slice(1));let n=null;return e.includes("?")&&([e,n]=e.split("?",2)),e.startsWith("#")?this._finalizeAbsPath(this._resolveSymbolicDatapath(e,t),n):(e.startsWith(".")&&(e=this._composeRelativeDatapath(e,t)),this._finalizeAbsPath(e,n))}_finalizeAbsPath(e,t){return e=this._collapseParentDatapath(e,e),t?`${e}?${t}`:e}_composeRelativeDatapath(e,t){let n=this;for(;n!==null&&e.startsWith(".");){let a=n.getAttr("datapath");a!=null&&(e=e==="."?a:a+e),n=n.parentNode}if(e.startsWith("."))throw new Error(`unresolved relative datapath: ${t}`);return e}_collapseParentDatapath(e,t){let n=[];for(let a of e.split("."))if(a==="#parent"){if(n.length===0)throw new Error(`#parent has no segment to cancel: ${t}`);n.pop()}else n.push(a);return n.join(".")}_resolveSymbolicDatapath(e,t){let n=e.slice(1),a=n.indexOf("."),i=a===-1?n:n.slice(0,a),s=a===-1?"":n.slice(a+1),o;if(i==="FORM")o=this._findMarkedDatapathAncestor(!0,!1,t);else if(i==="ANCHOR")o=this._findMarkedDatapathAncestor(!1,!0,t);else{let l=this.rootBuilder;if(!l)throw new Error(`#<id>: cannot resolve ${t} on a node without builder`);if(o=l.source.getNodeByAttr("nodeId",i),o==null)throw new Error(`#<id>: cannot resolve ${t}`)}return o.absDatapath(s?`.${s}`:".")}_findMarkedDatapathAncestor(e,t,n){let a=this;for(;a!=null;){let s=a.getAttr()||{};if(e&&(s.formId!=null||s.form===!0)||t&&"_anchor"in s)return a;a=a.parentNode}let i=e?"FORM":"ANCHOR";throw new Error(`#${i}: no marked ancestor found for ${n}`)}getRelativeData(e,t=null,{autocreate:n=!1}={}){let a=this.data,i=this.absDatapath(e);return n&&a.getItem(i)==null&&a.setItem(i,t),a.getItem(i,t)}setRelativeData(e,t,{attributes:n=null,fired:a=!1,reason:i=null}={}){let s=this.data,o=this.absDatapath(e);s.setItem(o,t,n,">",!1,!0,i===null?!0:i,a)}fireEvent(e,t=!0,{attributes:n=null,reason:a=null}={}){this.setRelativeData(e,t,{attributes:n,fired:!0,reason:a})}SET(e,t){this.setRelativeData(e,t)}GET(e){return this.getRelativeData(e)}PUT(e,t){this.setRelativeData(e,t,{reason:!1})}FIRE(e,t=!0){this.setRelativeData(e,t,{fired:!0})}},J=class r extends le{constructor(e=null,t=null){super(e),this._builder=t,this._insertingBuilder=null}get nodeClass(){return er}_setBuilderItem(e,t,n,...a){let i=t?.map(([o])=>[o,o._builder])||null;if(t)for(let[o,l]of t)o._builder=l;let s=this._insertingBuilder;this._insertingBuilder=e;try{return this.setItem(n,...a)}catch(o){if(this.node(n)==null&&i)for(let[l,u]of i)l._builder=u;throw o}finally{this._insertingBuilder=s}}bindBuilder(e){if(!e)throw new Error("SourceBag.bindBuilder requires a builder");let t=this._builderBindingPlan(e);for(let[n,a]of t)n._builder=a;return this.setBackref(),this}_builderBindingPlan(e){let t=[],n=new WeakSet,a=(i,s)=>{if(n.has(i))throw new Error("source contains a cyclic or shared SourceBag branch");n.add(i),t.push([i,s]);for(let o of i.getNodes()){let l=s,u=o._getMeta("subbuilder");u!=null&&(l=s._resolveSubbuilderReference(u,o.getAttr()||{},o.nodeTag)),t.push([o,l]);let c=o.getValue(!0);c instanceof r&&a(c,l)}};return a(this,e),t}};if((Ge(J.tytxSuffix).SourceBag??J)!==J)throw new Error("TYTX subtype name 'SourceBag' is already registered for another class");Sr(J.tytxSuffix,{...Ge(J.tytxSuffix),SourceBag:J});function Df(r){if(r.length===0)return{value:null,attrs:{}};let e=r[0];if(e!==null&&typeof e=="object"){let t=Object.getPrototypeOf(e);if(t===Object.prototype||t===null)return{value:null,attrs:e}}return{value:e,attrs:r[1]||{}}}var Tf=new Set(["then","toJSON"]),No=new WeakMap;function Lr(r){return No.get(r)||r}function ti(r){if(r==null)return r;r=Lr(r);let e=r._builder||r.parentBag&&r.parentBag._builder;return e?e.wrapSource(r):r}function So(r,e){let t=e instanceof le,n=new Proxy(e,{get(a,i){if(typeof i=="symbol"||i.startsWith("_")||Tf.has(i))return Reflect.get(a,i,a);let s=r.schemaTag(i);if(t&&s)return To(r,a,s,t);if(i in a){let l=Reflect.get(a,i,a);return typeof l=="function"?l.bind(a):l}if(s)return To(r,a,s,t);let o=r.containerMethod(i);if(o)return(...l)=>r[o](r.wrapSource(a),...l)}});return No.set(n,e),n}function To(r,e,t,n){return(...a)=>{let{value:i,attrs:s}=Df(a),o=n?r.bagCall(e,t,i,s):r.commandOnNode(e,t,i,s);return o.builder.wrapSource(o)}}var Bo=/^[A-Za-z_][A-Za-z0-9_]*$/,Cf=new Set(["positional_only","positional_or_keyword","keyword_only","var_positional","var_keyword"]),Nf=new Set(["framework","value","attribute"]),Sf=new Map([["builtins.str",r=>typeof r=="string"],["builtins.int",r=>Number.isInteger(r)],["builtins.float",r=>typeof r=="number"&&Number.isFinite(r)],["builtins.bool",r=>typeof r=="boolean"],["builtins.list",r=>Array.isArray(r)],["builtins.dict",r=>r!==null&&typeof r=="object"&&!Array.isArray(r)],["builtins.tuple",r=>Array.isArray(r)],["builtins.set",r=>Array.isArray(r)||r instanceof Set],["builtins.NoneType",r=>r===null],["builtins.object",r=>!0]]);function kt(r){return r!==null&&typeof r=="object"&&!Array.isArray(r)}function E(r,e){throw new TypeError(`${r}: ${e}`)}function Ue(r,e,t,n){kt(r)||E(n,"must be an object");for(let a of Object.keys(r))e.includes(a)||E(n,`unknown field '${a}'`);for(let a of t)Object.hasOwn(r,a)||E(n,`missing field '${a}'`)}function At(r,e){if(!(r===null||typeof r=="string"||typeof r=="boolean")&&!(typeof r=="number"&&Number.isFinite(r))){if(Array.isArray(r))return r.forEach((t,n)=>At(t,`${e}[${n}]`));if(kt(r))return Object.entries(r).forEach(([t,n])=>At(n,`${e}.${t}`));E(e,"must be lossless JSON data")}}function If(r,e){let t="",n=!1;for(let a=0;a<r.length;a++){let i=r[a];if(i==="\\"){t+=i+(r[++a]??"");continue}i==="["&&(n=!0),!n&&i==="."&&!(e&16)?t+="[^\\n]":!n&&i==="^"&&e&8?t+="(?:^|(?<=\\n))":!n&&i==="$"?t+=e&8?"(?=\\n|(?![\\s\\S]))":"(?=\\n?(?![\\s\\S]))":t+=i,i==="]"&&(n=!1)}return t}function Et(r,e,t=!1,n=null){if(r===null)return null;switch(Ue(r,["kind","dtype","module","name","origin","arguments","items","values","base","metadata","pattern","flags","ge","le","gt","lt","value"],["kind"],e),r.kind){case"custom":return Ue(r,["kind","name"],["kind","name"],e),n||E(e,"custom references require a catalog; nested catalog references are unsupported"),n.resolve(r.name,e);case"dtype":{Ue(r,["kind","dtype"],["kind","dtype"],e);let a=r.dtype;typeof a!="string"&&E(e,"dtype must be a string");let i=Nr(a);return!i&&a!=="NN"&&E(e,`unknown dtype '${a}'`),{...r,test:o=>a==="NN"?o===null:a==="N"?Te(o)&&!["NaN","Infinity","-Infinity"].includes(o.toString()):i===Number?typeof o=="number"&&Number.isFinite(o)&&(a!=="L"||Number.isInteger(o)):i===String?typeof o=="string":i===Boolean?typeof o=="boolean":i===Date?o instanceof Date&&Number.isFinite(o.getTime()):i===Object?kt(o)&&[Object.prototype,null].includes(Object.getPrototypeOf(o)):o instanceof i}}case"any":return{...r,test:a=>!0};case"type":{(typeof r.module!="string"||typeof r.name!="string")&&E(e,"type requires string module/name");let a=`${r.module}.${r.name}`;if(a==="collections.abc.Callable")return{...r,test:s=>typeof s=="function",portable:!1};let i=Sf.get(a);return i||E(e,`unsupported type '${a}'`),{...r,test:i}}case"union":{(!Array.isArray(r.items)||!r.items.length)&&E(e,"union items must be non-empty");let a=r.items.map((i,s)=>Et(i,`${e}.items[${s}]`,!0,n));return{...r,items:a,inputConstraint:a.some(i=>i.inputConstraint),test:i=>a.some(s=>s.test&&s.test(i))}}case"literal":return Array.isArray(r.values)||E(e,"literal values must be an array"),r.values.forEach((a,i)=>At(a,`${e}.values[${i}]`)),{...r,test:a=>r.values.some(i=>Object.is(i,a))};case"annotated":{Array.isArray(r.metadata)||E(e,"annotated metadata must be an array"),r.metadata.some(s=>!["regex","range","value"].includes(s?.kind))&&E(e,"unsupported annotation metadata kind");let a=Et(r.base,`${e}.base`,!0,n),i=r.metadata.map((s,o)=>Et(s,`${e}.metadata[${o}]`,!0,n));return{...r,base:a,metadata:i,inputConstraint:a.inputConstraint,test:s=>a.test(s)&&i.every(o=>!o.test||o.test(s))}}case"range":{for(let a of["ge","le","gt","lt"])Object.hasOwn(r,a)||E(e,`range missing '${a}'`);for(let a of["ge","le","gt","lt"])r[a]!==null&&(typeof r[a]!="number"||!Number.isFinite(r[a]))&&E(e,`${a} must be finite number or null`);return{...r,test:a=>typeof a=="number"&&(r.ge===null||a>=r.ge)&&(r.le===null||a<=r.le)&&(r.gt===null||a>r.gt)&&(r.lt===null||a<r.lt)}}case"regex":{(typeof r.pattern!="string"||!Number.isInteger(r.flags)||r.flags<0)&&E(e,"regex requires pattern and non-negative integer flags");let a=r.flags&-59;a&&E(e,`unsupported Python regex flags ${a}`),r.flags&2&&E(e,"IGNORECASE is not portable across Python and JavaScript Unicode rules"),/\\[AZzUwWdDsSabBN0-9]|\(\?P[<=!]|\(\?\(|\(\?>|\(\?#|\(\?[aiLmsux-]|[+*?}]\+|\{,/.test(r.pattern.replaceAll(String.raw`[\s\S]`,"."))&&E(e,"regex uses a non-portable construct or character class");let i="uy";r.flags&16&&(i+="s");let s;try{s=new RegExp(`(?:${If(r.pattern,r.flags)})(?![\\s\\S])`,i)}catch(o){E(e,`invalid portable regex: ${o.message}`)}return{...r,test:o=>typeof o!="string"?!1:(s.lastIndex=0,s.test(o))}}case"value":return At(r.value,`${e}.value`),{...r};case"generic":{let a=Et(r.origin,`${e}.origin`,!0,n);(r.origin?.kind!=="type"||r.origin.module!=="builtins"||!["list","dict","tuple","set"].includes(r.origin.name))&&E(e,"only list, dict, tuple and set generic origins are supported"),Array.isArray(r.arguments)||E(e,"generic arguments must be an array");let i=r.arguments.map((s,o)=>Et(s,`${e}.arguments[${o}]`,!0,n));return{...r,origin:a,arguments:i,inputConstraint:i.some(s=>s.inputConstraint),test:s=>a.test(s)&&Bf(r.origin,i,s)}}case"arguments":E(e,"Callable argument-list descriptors are not supported by Python validation");case"ellipsis":return t||E(e,"ellipsis is only valid as a nested descriptor"),{...r};default:E(e,`unknown annotation kind '${r.kind}'`)}}function Bf(r,e,t){let n=`${r.module}.${r.name}`;return n==="builtins.tuple"&&e.length&&e[1]?.kind!=="ellipsis"?t.length===e.length&&t.every((a,i)=>e[i].test(a)):n==="builtins.list"||n==="builtins.set"||n==="builtins.tuple"?[...t].every(a=>!e[0]?.test||e[0].test(a)):n==="builtins.dict"?Object.entries(t).every(([a,i])=>(!e[0]?.test||e[0].test(a))&&(!e[1]?.test||e[1].test(i))):!1}function Oo(r,e){if(r===null)return null;if(typeof r!="string"&&E(e,"must be string or null"),r==="")return new Map;let t=new Map;for(let n of r.split(",")){let a=n.trim();/^[A-Za-z_][A-Za-z0-9_]*\[\]$/.test(a)&&E(e,`invalid cardinality item '${n}'`);let i=a.match(/^([A-Za-z_][A-Za-z0-9_]*|\*)(?:\[(?:(\d+)|(?:(\d*):(\d*)))\])?$/);i||E(e,`invalid cardinality item '${n}'`);let[,s,o,l,u]=i;t.has(s)&&E(e,`duplicate tag '${s}'`);let c=0,d=1/0;a.includes("[")&&(a.includes(":")?(c=l?Number(l):0,d=u?Number(u):1/0):c=d=Number(o)),d<c&&E(e,`maximum ${d} is below minimum ${c}`),t.set(s,{min:c,max:d})}return t.has("*")&&t.size>1&&E(e,"wildcard '*' cannot be combined with named tags"),t}function Mo(r,e){if(r===null)return null;typeof r!="string"&&E(e,"must be string or null");let t=new Set;for(let n of r.split(",")){let a=n.trim();a&&((!Bo.test(a)||t.has(a))&&E(e,`invalid or duplicate parent '${n}'`),t.add(a))}return t}function Of(r,e,t){if(r===null)return null;Ue(r,["parameters","accepts_var_keyword","accepts_var_positional"],[],e);let n=r.parameters??[];Array.isArray(n)||E(e,"parameters must be an array"),r={parameters:n,accepts_var_keyword:n.some(l=>l.kind==="var_keyword"),accepts_var_positional:n.some(l=>l.kind==="var_positional"),...r},(!Array.isArray(r.parameters)||typeof r.accepts_var_keyword!="boolean"||typeof r.accepts_var_positional!="boolean")&&E(e,"invalid signature descriptor");let a=new Set,i=!1,s=!1,o=r.parameters.map((l,u)=>{let c=`${e}.parameters[${u}]`;return Ue(l,["name","kind","role","annotation","has_default","default"],["name","kind","role","annotation","has_default"],c),(typeof l.name!="string"||!Bo.test(l.name)||a.has(l.name))&&E(c,"invalid or duplicate parameter name"),a.add(l.name),(!Cf.has(l.kind)||!Nf.has(l.role)||typeof l.has_default!="boolean")&&E(c,"invalid kind, role, or has_default"),l.has_default!==Object.hasOwn(l,"default")&&E(c,"default presence must equal has_default"),l.has_default&&At(l.default,`${c}.default`),i||=l.kind==="var_keyword",s||=l.kind==="var_positional",{...l,annotation:Et(l.annotation,`${c}.annotation`,!1,t)}});return(i!==r.accepts_var_keyword||s!==r.accepts_var_positional)&&E(e,"variadic summary flags do not match parameters"),{...r,parameters:o}}function Io(r,e,t,n){let a=["doc","sub_tags","parent_tags","inherits_from","ns","attributes",...t?["node_label","collection_key"]:[],"_meta"];Ue(r,a,[],e),r={...Object.fromEntries(a.map(i=>[i,null])),...r};for(let i of["doc","inherits_from","ns",...t?["node_label","collection_key"]:[]])r[i]!==null&&typeof r[i]!="string"&&E(e,`${i} must be string or null`);return r._meta!==null&&(kt(r._meta)||E(e,"_meta must be object or null"),At(r._meta,`${e}._meta`)),Oo(r.sub_tags,`${e}.sub_tags`),Mo(r.parent_tags,`${e}.parent_tags`),{...r,attributes:Of(r.attributes,`${e}.attributes`,n)}}function Ro(r){return r?r.split(",").map(e=>e.trim()).filter(Boolean):[]}function Lo(r,e){let t={...e};for(let[n,a]of Object.entries(r))n==="inherits_from"||n.startsWith("_")||t[n]||(t[n]=a);return t._meta={...r._meta||{},...e._meta||{}},t}function Po(r){let e={...r};return e._subSpec=Object.hasOwn(e,"sub_tags")?Oo(e.sub_tags,"resolved.sub_tags"):null,e._parentSpec=Object.hasOwn(e,"parent_tags")?Mo(e.parent_tags,"resolved.parent_tags"):null,e}function $o(r,e,t,n){if(t.get(r)===1&&E(n,`inheritance cycle at '${r}'`),t.get(r)===2)return e[r];let a=e[r];a||E(n,`unknown abstract '${r}'`),t.set(r,1);let i={...a};for(let s of Ro(a.inherits_from))i=Lo($o(s,e,t,n),i);return i=Po(i),t.set(r,2),e[r]=i,i}function ri({abstracts:r={},elements:e={}}){let t={...r},n=new Map;for(let i of Object.keys(t))$o(i,t,n,`abstracts.${i}.inherits_from`);let a={};for(let[i,s]of Object.entries(e)){let o={...s};for(let l of Ro(s.inherits_from)){let u=t[l];u||E(`elements.${i}.inherits_from`,`unknown abstract '${l}'`),o=Lo(u,o)}a[i]=Po(o)}return{abstracts:t,elements:a}}function ni(r){Ue(r,["document_format","grammar","abstracts","elements","custom_types"],["document_format","grammar","abstracts","elements"],"grammar document"),Ue(r.document_format,["name","version"],["name","version"],"document_format"),(r.document_format.name!=="builder_grammar"||!["1.1","1.2"].includes(r.document_format.version))&&E("document_format","expected builder_grammar version 1.1 or 1.2"),Ue(r.grammar,["name","version","title","description"],["name","version","title","description"],"grammar"),(typeof r.grammar.name!="string"||!r.grammar.name)&&E("grammar.name","must be non-empty string");for(let a of["version","title","description"])r.grammar[a]!==null&&typeof r.grammar[a]!="string"&&E(`grammar.${a}`,"must be string or null");(!kt(r.abstracts)||!kt(r.elements))&&E("grammar document","abstracts/elements must be objects"),Object.hasOwn(r,"custom_types")&&r.document_format.version!=="1.2"&&E("custom_types","requires version 1.2");let e=$n.fromJSON(r.custom_types??{}),t={};for(let[a,i]of Object.entries(r.abstracts))(!a||a.startsWith("_"))&&E("abstracts",`invalid public name '${a}'`),t[a]=Io(i,`abstracts.${a}`,!1,e);let n={};for(let[a,i]of Object.entries(r.elements))(!a||a.startsWith("_"))&&E("elements",`invalid public name '${a}'`),n[a]=Io(i,`elements.${a}`,!0,e);return{grammar:structuredClone(r.grammar),abstracts:t,elements:n}}function Fo(r,e,t,n){let a=e.attributes;if(!a)return;let i={...n};t!=null&&(i.node_value=t);let s=new Set(a.parameters.filter(u=>u.role==="attribute").map(u=>u.name)),o=new Set(["node_label","node_position","nodeId","target_id","datapath","iterate","store","_tag","_meta","ns"]);if(!a.accepts_var_keyword)for(let u of Object.keys(n))!s.has(u)&&!o.has(u)&&E(r,`unknown attribute '${u}'`);let l=e._meta?.component?a.parameters.find(u=>u.role!=="framework"&&["positional_only","positional_or_keyword"].includes(u.kind))?.name:null;for(let u of a.parameters){if(u.name===l||u.role==="framework"||u.kind.startsWith("var_"))continue;let c=Object.hasOwn(i,u.name);!c&&!u.has_default&&E(r,`missing required ${u.role} '${u.name}'`),c&&u.annotation!==null&&(!u.annotation.test||!u.annotation.test(i[u.name]))&&E(r,`invalid value for ${u.role} '${u.name}'`)}}var $n=class r{#e=new Map;#n=new Map;register(e,t,n){let a=new Map([[String,"str"],[Number,"float"],["string","str"],["integer","int"],["number","float"]]),i=a.has(t)?{kind:"type",module:"builtins",name:a.get(t)}:t;return this.#t(e,{kind:"annotated",base:i,metadata:[n]})}#t(e,t){(typeof e!="string"||!/^[A-Za-z][A-Za-z0-9_]*$/.test(e)||e in this||["to_dict","from_dict"].includes(e)||Mf.has(e))&&E("custom_types",`invalid, reserved or duplicate name '${e}'`),Ue(t,["kind","base","metadata"],["kind","base","metadata"],`custom_types.${e}`),(t.kind!=="annotated"||!Array.isArray(t.metadata)||t.metadata.length!==1||!["regex","range"].includes(t.metadata[0]?.kind))&&E(`custom_types.${e}`,"requires an annotated base with one Regex or Range validator");let n=t.metadata[0].kind==="regex"?["str"]:["int","float"];(t.base?.kind!=="type"||t.base.module!=="builtins"||!n.includes(t.base.name))&&E(`custom_types.${e}`,"portable Regex requires str; portable Range requires int or float"),At(t,`custom_types.${e}`);let a=structuredClone(t),i=Et(a,`custom_types.${e}`),s=Object.freeze({kind:"custom",name:e});return Object.defineProperty(this,e,{value:s,enumerable:!0}),this.#e.set(e,a),this.#n.set(e,{...s,inputConstraint:!0,test:i.test}),s}resolve(e,t="custom_types"){return this.#n.has(e)||E(t,`unknown custom type '${e}'`),{...this.#n.get(e)}}validate(e,t){return this.resolve(e).test(t)||E(`custom_types.${e}`,"invalid input value"),!0}toJSON(){return structuredClone(Object.fromEntries(this.#e))}static fromJSON(e){kt(e)||E("custom_types","must be an object");let t=new r;for(let[n,a]of Object.entries(e))t.#t(n,a);return t}},Mf=new Set("False None True and as assert async await break class continue def del elif else except finally for from global if import in is lambda nonlocal not or pass raise return try while with yield".split(" "));function Uo(r,e,t,n){let a=e?.attributes;if(a)for(let i of a.parameters){if(!i.annotation?.inputConstraint||i.role==="framework"||["var_keyword","var_positional"].includes(i.kind))continue;let s=i.role==="value"?t:n[i.name];s!==void 0&&(i.annotation.test(s)||E(r,`invalid input for '${i.name}' (custom type)`))}}function qo(r,e,t=[]){if(e===null)return structuredClone(r);if(t.length===2&&t[0]==="custom_types"&&r!==void 0){if(!ai(r,e))throw new TypeError(`conflicting custom type '${t[1]}'`);return structuredClone(r)}if(t.length===2&&["abstracts","elements"].includes(t[0]))return structuredClone(e);if(Ye(r)&&Ye(e)){let n=structuredClone(r);for(let[a,i]of Object.entries(e))i!==null&&Object.defineProperty(n,a,{value:qo(n[a],i,[...t,a]),enumerable:!0,writable:!0,configurable:!0});return n}return structuredClone(e)}function ai(r,e){return Object.is(r,e)?!0:Array.isArray(r)&&Array.isArray(e)?r.length===e.length&&r.every((t,n)=>ai(t,e[n])):Ye(r)&&Ye(e)?Object.keys(r).length===Object.keys(e).length&&Object.keys(r).every(t=>Object.hasOwn(e,t)&&ai(r[t],e[t])):!1}function Ye(r){return r!==null&&typeof r=="object"&&!Array.isArray(r)&&Object.getPrototypeOf(r)===Object.prototype}function ii(r){if(!(r===null||typeof r=="string"||typeof r=="boolean")&&!(typeof r=="number"&&Number.isFinite(r))){if(Array.isArray(r)){r.forEach(ii);return}if(Ye(r)){Object.values(r).forEach(ii);return}throw new TypeError("collection must contain only finite JSON values")}}var Ze=class r{#e;constructor(e){ii(e);let t=["document_format","grammar","abstracts","elements"];if(!Ye(e)||Object.keys(e).some(a=>![...t,"custom_types"].includes(a))||t.some(a=>!Object.hasOwn(e,a)))throw new TypeError("collection requires document_format, grammar, abstracts and elements");let n=e.document_format;if(!Ye(n)||Object.keys(n).length!==2||n.name!=="builder_grammar"||!["1.1","1.2"].includes(n.version))throw new TypeError("expected builder_grammar version 1.1 or 1.2");for(let a of["grammar","abstracts","elements"])if(!Ye(e[a]))throw new TypeError(`${a} must be an object`);if(Object.hasOwn(e,"custom_types")&&(n.version!=="1.2"||!Ye(e.custom_types)))throw new TypeError("custom_types requires an object catalog and version 1.2");this.#e=structuredClone(e)}update(e){let t=new r(e),n=qo(this.#e,t.#e);return(this.#e.document_format.version==="1.2"||t.#e.document_format.version==="1.2")&&(n.document_format.version="1.2"),this.#e=n,this}toDocument(){return structuredClone(this.#e)}};var Dt=class{static renderType="string";static mode=null;constructor(e){this._builder=e,this.renders=new Map([[e,this]])}get builder(){return this._builder}get renderType(){return this.constructor.renderType}get mode(){return this.constructor.mode}addRender(e,t){this.renders.set(e,t)}getRender(e){let t=this.renders.get(e);if(t!==void 0)return t;let n=e.getRenderer();return this.renders.set(e,n),n}render(e,t={}){let n=e.builder,[a,i]=n.runtimeValues(e);if(e._getMeta("data_element"))return null;if(e._getMeta("component"))return this._renderComponent(e,i,t);let s=this.getRender(n),o;return[o,i]=s._handleMeta(e,i),e._getMeta("subbuilder")||(i=s.adaptAttrs(i)),e.value instanceof J&&(a=this.renderChildren(e.value,t)),s.renderedItem(e,a,i,{tag:o,...t})}renderChildren(e,t={}){let n=[];for(let a of e.getNodes()){let i=this.render(a,t);i!==null&&(Array.isArray(i)?n.push(...i):n.push(i))}return n}_renderComponent(e,t,n){let[a,i,s,o]=this._expansionInputs(e,t);if(!Object.hasOwn(e.getAttr(),"iterate"))return this._expandBlock(e,a,s,o,n);if(i==null)return[];if(!(i instanceof le))throw new TypeError(`component '${e.nodeTag}': iterate must resolve to a Bag, got ${i?.constructor?.name||typeof i}`);return i.getNodes().map(l=>this._expandBlock(e,a,s,{node_label:l.label},n))}_expansionInputs(e,t){let n=e.builder,a=n.componentMethod(e.nodeTag),i=a&&n[a];if(typeof i!="function")throw new Error(`component '${e.nodeTag}' has no implementation`);let s=t.iterate;delete t.iterate,delete t.store;let o=e.getAttr("iterate")||e.getAttr("store");o!=null?(e.pointerType(o)&&(o=o.slice(1)),o.startsWith(".")&&(o=e._composeRelativeDatapath(o,o))):o=null;for(let l of Object.keys(t)){let u=e.getAttr(l);e.pointerType(u)==="^"&&(t[l]=`^${e.absDatapath(u)}`)}return[i,s,o,t]}_expandBlock(e,t,n,a,i){let s=e.builder._expansionRoot(n);t.call(e.builder,ti(s),a);let o=s.getNodes();if(o.length!==1)throw new Error(`component '${e.nodeTag}' must build a tree, not a forest: ${o.length} root nodes`);let l={...i,depthOffset:this._nodeDepth(e,i.depthOffset||0)};return this.render(o[0],l)}preprocess(e){return e}renderedItem(e,t,n,a){throw new Error(`${this.constructor.name} does not implement renderedItem`)}_handleMeta(e,t){let[n,a]=e._getMeta("render_tag,render_attributes"),i=Qa(e.nodeTag,{renderTag:n,ns:e.getAttr("ns"),dialectName:e.builder?.constructor._name});if(!i)throw new Error(`node ${e.label} has no tag to render (no render_tag, no node_tag)`);return a&&(t={...t,...a}),[i,t]}adaptAttrs(e){return e}adapt(e){let t=`${this.builder.constructor._name}_`;return e.startsWith(t)?e.slice(t.length):e}finalize(e,t=null,n={}){let a=this._composeStringFragments(e);if(t==null)return a;if(typeof t=="string")throw new TypeError("string render targets require filesystem support, which is unavailable in the portable renderer; pass a callable or writable target instead");if(typeof t.full=="function"&&typeof t.write!="function")return t.full(a),null;if(typeof t.write=="function")return t.write(a),null;if(typeof t=="function")return t(a),null;throw new TypeError("render target must be writable (.write), callable, or expose .full")}_composeStringFragments(e){if(!Array.isArray(e))return e;if(e.some(t=>typeof t!="string"))throw new TypeError("String composition requires string fragments; object renderers must define their own composition");return e.join("")}_escapeText(e){return String(e).replaceAll("&","&").replaceAll("<","<").replaceAll(">",">")}_escapeAttr(e){return this._escapeText(e).replaceAll('"',""")}_nodeDepth(e,t=0){let a=((e.fullpath||"").match(/\./g)||[]).length;return Math.max(a-1,0)+t}};var Tt=class extends Dt{static mode="xml";renderedItem(e,t,n,{tag:a,pretty:i=!1,depthOffset:s=0}={}){let o=this._formatAttrs(n),l=i?" ".repeat(this._nodeDepth(e,s)):"",u=i?`
|
|
23
|
-
`:"";if(Array.isArray(t)){let c=this._composeStringFragments(t);return`${l}<${a}${o}>${u}${c}${l}</${a}>${u}`}return t==null?`${l}<${a}${o}></${a}>${u}`:`${l}<${a}${o}>${this._escapeText(t)}</${a}>${u}`}finalize(e,t=null,{docHeader:n=null}={}){let a=this._composeStringFragments(e);return n===!0?a=`<?xml version='1.0' encoding='UTF-8'?>${a}`:typeof n=="string"&&(a=n+a),super.finalize(a,t)}_formatAttrs(e){return Object.entries(e||{}).map(([t,n])=>` ${t.startsWith("xmlns_")?`xmlns:${t.slice(6)}`:t}="${this._escapeAttr(n)}"`).join("")}};var jo={document_format:{name:"builder_grammar",version:"1.1"},grammar:{name:"base",version:null,title:null,description:null},abstracts:{},elements:{dataSetter:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"destination",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"type",module:"builtins",name:"str"},has_default:!1},{name:"value",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"any"},has_default:!1},{name:"attr",kind:"var_keyword",role:"attribute",annotation:{kind:"any"},has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{data_element:!0}},dataFormula:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"destination",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"type",module:"builtins",name:"str"},has_default:!1},{name:"func",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"union",items:[{kind:"type",module:"builtins",name:"str"},{kind:"type",module:"collections.abc",name:"Callable"}]},has_default:!1},{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{data_element:!0}},dataController:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"func",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"union",items:[{kind:"type",module:"builtins",name:"str"},{kind:"type",module:"collections.abc",name:"Callable"}]},has_default:!1},{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{data_element:!0}}}};function zo(r){let e=[];for(;r&&r!==Function.prototype;)e.push(r),r=Object.getPrototypeOf(r);return e.reverse()}function Lf(r){let e=Object.create(null),t=(n,a)=>{let i=n.toLowerCase(),s=e[i];if(s!==void 0&&s!==a)throw new Error(`container '${n}' is already tied to implementation method '${s}' (cannot rebind to '${a}')`);e[i]=a};for(let n of zo(r))if(Object.hasOwn(n,"containers"))for(let a of n.containers||[])t(a,a);return e}function Pr(r){let e=Object.create(null);for(let t of Object.keys(r)){let n=t.toLowerCase();if(Object.hasOwn(e,n))throw new Error(`element declaration '${t}' has a case-insensitive collision with '${e[n]}'`);e[n]=t}return e}var $r="_root_",si="_root_",Vo=new Set(["destination","func","value","_on_start"]),qe=class r{static _sourceClass=J;static registerBuilder(e){if(typeof e!="function"||!(e.prototype instanceof r))throw new TypeError("registerBuilder requires a BuilderBase subclass");let t=e._name;if(typeof t!="string"||!t)throw new TypeError("registered builders require a non-empty static _name");let n=r._registry.get(t);if(n&&n!==e)throw new Error(`Builder name '${t}' is already registered to ${n.name}; cannot register ${e.name}`);return r._registry.set(t,e),e}static getBuilderClass(e){let t=r._registry.get(e);if(!t)throw new Error(`No builder registered with name '${e}'`);return t}constructor(e=null){this.name=e||this.constructor._name,this._dataroot=new le,this._dataroot.setBackref(),this._dataroot.setItem(si,new le),this.data=this._dataroot.getItem(si),this._defaultTargets=new Map,this.materialized=Object.create(null),this._collection=null,this._schemaOverride=null,this._tagNamesOverride=null,this._componentMap=null,this._targetSerial=0,this._subbuilders=new Map,this._sourceHandles=new WeakMap;let t=this.constructor._sourceClass;this._sourceroot=new t(null,this),this._sourceroot.setBackref(),this._sourceroot.setItem($r,new t(null,this)),this.source=this._sourceroot.getItem($r)}wrapSource(e){if(e=Lr(e),!(e instanceof J)&&!(e instanceof er))throw new TypeError("wrapSource requires a SourceBag or SourceBagNode");let t=this._sourceHandles.get(e);return t||(t=So(this,e),this._sourceHandles.set(e,t)),t}get root(){return this.wrapSource(this.source)}getSubbuilder(e){if(typeof e!="string"||!e||e.includes(":"))throw new Error(`unsupported subbuilder reference '${e}'`);let t=this._subbuilders.get(e);if(!t){let n=r.getBuilderClass(e);t=new n,this._subbuilders.set(e,t)}return t._dataroot=this._dataroot,t.data=this.data,t}_resolveSubbuilderReference(e,t,n){if(typeof e!="string"||!e)throw new Error(`'${n}': subbuilder declaration must be a non-empty string`);if(e.includes(":"))throw new Error(`'${n}': runtime subbuilder reference '${e}' is unsupported`);return this.getSubbuilder(e)}static defineGrammar(e){let t=this._classCollection,n=t?new Ze(t.toDocument()).update(e):new Ze(e),a=ni(n.toDocument()),i=ri(a),s=Pr(i.elements);this._classCollection=n,this._classSchema=i.elements,this._abstracts=i.abstracts,this._tagNames=s}static{this.defineGrammar(jo)}get _containers(){return Lf(this.constructor)}containerMethod(e){return this._containers[e.toLowerCase()]||null}componentMethod(e){return this._componentMap?.[e.toLowerCase()]||null}get schema(){return this._schemaOverride||this.constructor._classSchema||{}}get schemaTagNames(){return this._schemaOverride?this._tagNamesOverride??=Pr(this.schema):this.constructor._tagNames??=Pr(this.schema)}schemaTag(e){let t=e.toLowerCase(),n=this.schemaTagNames[t];if(n)return n;let a=`${this.constructor._name}_`;return t.startsWith(a)&&this.schemaTagNames[t.slice(a.length)]||null}loadGrammar(e,{replace:t=!1}={}){let n=this._collection||this.constructor._classCollection,a=t?new Ze(e):new Ze(n.toDocument()).update(e),i=ni(a.toDocument()),s=ri(i),o=Pr(s.elements);return this._collection=a,this._schemaOverride=s.elements,this._tagNamesOverride=o,this}validateCustomTypes(e){let t=e.parentBag?.parentNode?.builder||e.parentBag?._builder,n=t&&t!==this&&t.schema[e.nodeTag]?._meta?.subbuilder?t:this;Uo(e.nodeTag,n.schema[e.nodeTag],e.value,e.getAttr()||{})}validateNodeValues(e,t,n={}){let a=this.schemaTag(e);if(!a)throw new Error(`unknown element '${e}'`);return Fo(a,this.schema[a],t,n),!0}validateNode(e,{value:t,attrs:n,childTags:a}={}){if(!e||typeof e.nodeTag!="string")throw new TypeError("validateNode requires a source node");let i=t!==void 0?t:e.value instanceof J?null:e.value;this.validateNodeValues(e.nodeTag,i,n||e.getAttr?.()||{});let s=this.schema[this.schemaTag(e.nodeTag)],o=a||(e.value instanceof J?e.value.getNodes().map(l=>l.nodeTag):null);return o&&this._validateChildren(e.nodeTag,s,o,!1),!0}validateChildren(e,t,{includeMinimum:n=!1}={}){let a=this.schemaTag(e);if(!a)throw new Error(`unknown element '${e}'`);if(!Array.isArray(t)||t.some(i=>typeof i!="string"))throw new TypeError("childTags must be an array of strings");return this._validateChildren(a,this.schema[a],t,n)}validateParent(e,t=null){let n=this.schemaTag(e);if(!n)throw new Error(`unknown element '${e}'`);let a=this.schema[n];if(!this._countsForGrammar(a))return!0;let i=a._parentSpec;if(i==null||i.has("*"))return!0;if(t===null)throw new Error(`'${n}' requires a declared parent`);let s=this.schemaTag(t);if(!s)throw new Error(`unknown parent element '${t}'`);return this._validateParent(n,a,s),!0}bagCall(e,t,n,a){return this.setChild(e,t,n,a)}commandOnNode(e,t,n,a){if(e=Lr(e),e.value instanceof J)return this.setChild(e.value,t,n,a);let i=e.value,s=new e.parentBag.constructor(null,e.builder||this),o=this.setChild(s,t,n,a,e);return this.promoteNodeValue(e,i,s),o}promoteNodeValue(e,t,n){e.setValue(n)}setChild(e,t,n,a,i=null){let s={...a},o=this.schema[t];if(!o)throw new Error(`unknown element '${t}'`);this.validateNodeValues(t,n,s);let l=o._meta?.subbuilder,c=(l==null?null:this._resolveSubbuilderReference(l,s,t))||this,d=n instanceof J?n._builderBindingPlan(c):null,f=i?.rootBuilder||e.root._builder||this;if(s.nodeId!=null&&f.source.getNodeByAttr("nodeId",s.nodeId))throw new Error(`Duplicate nodeId '${s.nodeId}'`);n instanceof J&&this._validateChildren(t,o,n.getNodes().map(v=>v.nodeTag),!1);let p=i||e.parentNode,h=p?.nodeTag?this.schema[p.nodeTag]:null;if(h&&!p._getMeta("subbuilder")&&this._countsForGrammar(o))this._validateParent(t,o,p.nodeTag),this._validateChildren(p.nodeTag,h,[...e.getNodes().map(v=>v.nodeTag),t],!1);else if(!h&&!p?._getMeta("subbuilder")&&o._parentSpec!=null&&this._countsForGrammar(o))throw new Error(`'${t}' requires a declared parent`);o._meta&&!("_meta"in s)&&(s._meta=o._meta),o.ns&&!("ns"in s)&&(s.ns=o.ns);let m=s.node_position;delete s.node_position;let g=s.node_label;delete s.node_label;let b;if(h?.collection_key){if(g!=null)throw new Error(`'${t}': node_label is not allowed in a collection`);b=this._collectionLabel(h.collection_key,t,s)}else{let v=h?._subSpec?.get(t);if(v&&v.max===1){if(g!=null)throw new Error(`'${t}': node_label is not allowed on a singleton`);b=t}else b=g||o.node_label||this._autoLabel(e,t)}if(e.node(b)!=null)throw new Error(`duplicate node label '${b}'`);return e._setBuilderItem(c,d,b,n,s,m||">",!1,!0,null,!1,!0,null,t)}_countsForGrammar(e){let t=e?._meta||{};return!(t.data_element||t.subbuilder||t.component)}_validateParent(e,t,n){let a=t._parentSpec;if(!(a==null||a.has("*")||!this._countsForGrammar(t))&&!a.has(n))throw new Error(`'${e}' not allowed as child of '${n}'`)}_validateChildren(e,t,n,a){let i=t._subSpec;if(i==null||i.has("*")||t._meta?.subbuilder)return[];let s=new Map;for(let o of n){let l=this.schema[o];if(l&&!this._countsForGrammar(l))continue;let u=i.get(o);if(!u)throw new Error(`'${o}' not allowed as child of '${e}'`);let c=(s.get(o)||0)+1;if(s.set(o,c),c>u.max)throw new Error(`too many '${o}' in '${e}'`)}return a?[...i].filter(([o,l])=>(s.get(o)||0)<l.min).map(([o])=>o):[]}_collectionLabel(e,t,n){let a=i=>{if(n[i]===null||n[i]===void 0)throw new Error(`'${t}': collection key needs attribute '${i}'`);return String(n[i])};return e.includes("${")?e.replace(/\$\{([^}]+)\}/g,(i,s)=>a(s)):a(e)}validateSource(){let e=[],t=(n,a="")=>{for(let i of n.getNodes()){let s=a?`${a}.${i.label}`:i.label,o=i.builder;o.validateCustomTypes(i);let l=o.schema[i.nodeTag];if(l&&!i._getMeta("data_element,subbuilder,component").some(Boolean)){let u=i.value instanceof J?i.value.getNodes().map(d=>d.nodeTag):[],c=o._validateChildren(i.nodeTag,l,u,!0);c.length&&e.push([s,c])}i.value instanceof J&&t(i.value,s)}};return t(this.source),e}_autoLabel(e,t){let n=0;for(;e.node(`${t}_${n}`)!==null&&e.node(`${t}_${n}`)!==void 0;)n+=1;return`${t}_${n}`}nodeById(e){let t=this.source.getNodeByAttr("nodeId",e);if(t==null)throw new Error(`nodeId not found: ${e}`);return t.builder.wrapSource(t)}runtimeValues(e){e.builder.validateCustomTypes(e);let t=new Map,n={},a=e.runtimeToEvaluate(),i=new Set(a.keys()),s=new Map([...Object.entries(e.getAttr()),...e.fixedAttrItems()]);for(let[c,d]of[...a])if(!(typeof c!="string"||!Qe(d)))for(let f of ea(e,d))a.has(f)||a.set(f,s.get(f));let o=e._getMeta("data_element");for(let[c,d]of a){if(d instanceof se){t.set(c,d.resolve());continue}let f=typeof c=="string"?Qe(d)?.pointer??d:d;if(!e.pointerType(f)){t.set(c,typeof c=="string"&&typeof d=="string"&&d.startsWith("==")?null:d);continue}let p=e.absDatapath(f);if(t.set(c,this.data.getItem(p)),!o&&!p.includes("?")&&c===tr){let h=this.data.getNode(p);h&&Object.assign(n,h.getAttr("_wdg"))}}let l=wi(a,t,(c,d,f,p)=>this.evaluatePointerExpression(e,c,d,f,p)),u=l.get(tr);l.delete(tr);for(let c of l.keys())i.has(c)||l.delete(c);return[u,{...Object.fromEntries(l),...n}]}evaluatePointerExpression(e,t,n,a,i){return null}targetId(e){if(e._targetId)return e._targetId;let t=e.rootBuilder;return e.parentBag.root!==t.source.root?null:(t._targetSerial+=1,e._targetId=`n${t._targetSerial}`,e._targetId)}get dataLogic(){if(!this._dataLogic){let e=this._buildDataLogic();this._dataLogic=Array.isArray(e)?e:[e]}return this._dataLogic}_buildDataLogic(){return this}_resolveLogicFunc(e){if(typeof e=="function")return e;if(typeof e!="string")throw new Error("data-element func must be a name or a function");for(let t of this.dataLogic){let a=(typeof t=="function"?t:t.constructor)[e];if(typeof a=="function")return a}throw new Error(`data-element func '${e}' not found on any data_logic source`)}_bindings(e){let[,t]=this.runtimeValues(e),n={};for(let[a,i]of Object.entries(t))Vo.has(a)||(n[a]=i);return n}computeLogic(e){for(let t of e)this._computeNode(t)}_computeNode(e){let t=e.getAttr()||{};if(e.nodeTag==="dataSetter"){let n={};for(let[a,i]of Object.entries(t))a!=="destination"&&a!=="value"&&!a.startsWith("_")&&(n[a]=i);e.setRelativeData(t.destination,t.value,{attributes:Object.keys(n).length?n:null})}else if(e.nodeTag==="dataFormula"){let n=this._resolveLogicFunc(t.func);e.setRelativeData(t.destination,n(this._bindings(e)))}else e.nodeTag==="dataController"&&this._resolveLogicFunc(t.func)(e,this._bindings(e))}_dataElementNodes(){let e=[],t=n=>{for(let a of n.getNodes())a._getMeta("data_element")&&e.push(a),a.value instanceof J&&t(a.value)};return t(this.source),e}setup(e){}main(e){throw new Error(`${this.constructor.name}.main() not implemented: a bare builder is grammar, not a renderable page`)}_resolveComponents(){let e={};for(let o of zo(this.constructor))if(Object.hasOwn(o,"components"))for(let l of o.components||[])e[l]=l;if(!Object.keys(e).length)return;let t={...this.schema},n={};for(let[o,l]of Object.entries(e))t[o]={sub_tags:"",_meta:{component:!0}},n[o.toLowerCase()]=l;let a=Pr(t),i=this._collection||this.constructor._classCollection,s=i.toDocument();s.abstracts={},s.elements=Object.fromEntries(Object.keys(e).map(o=>[o,t[o]])),this._collection=new Ze(i.toDocument()).update(s),this._schemaOverride=t,this._componentMap=n,this._tagNamesOverride=a}_expansionRoot(e=null){let t=this.constructor._sourceClass,n=new t(null,this);return n.setBackref(),n.setItem($r,new t(null,this),e?{datapath:e}:null),n.getItem($r)}create(){this.setup(this.data),this._resolveComponents(),this.main(this.root),this.computeLogic(this._dataElementNodes())}get renderer_xml(){return new Tt(this)}getRenderer(e=null){e??=this.constructor._defaultRenderMode;let t=this[`renderer_${e}`];if(!t)throw new Error(`${this.constructor.name} does not expose renderer_${e}`);return t}materialize(e=null,t={}){e??=this.constructor._defaultRenderMode;let n=this.getRenderer(e),a=n.renderChildren(n.preprocess(this.source),t);return this.materialized[e]=a,a}setRenderTarget(e,t=null){t??=this.constructor._defaultRenderMode,this._defaultTargets.set(t,e)}render({mode:e=null,target:t=null,...n}={}){e??=this.constructor._defaultRenderMode;let a=this.getRenderer(e);if(t===!1&&a.renderType!=="string")throw new TypeError("target=false is not valid for an object renderer");let i=t===!1?null:t||this._defaultTargets.get(a.mode)||null,s={...i?.renderOpts,...n};return a.finalize(this.materialize(e,s),i,s)}};qe._registry=new Map;var Pf=new Set(["short","medium","long","full"]),$f=/('(?:[^']|'')*'|[a-zA-Z]+|[^a-zA-Z']+)/g;function Ff(r,e){if(!(r instanceof Date))throw new TypeError("Temporal formats require a typed Date value");if(!Number.isFinite(r.getTime()))throw new RangeError("Invalid date");let t=e||Ee(r).split("::").at(-1);if(!["D","H","DH","DHZ"].includes(t))throw new RangeError(`Unsupported temporal dtype: ${t}`);return t}function Uf(r,e,t,n){let a=e.match($f)||[];if(a.join("")!==e)throw new RangeError("Unclosed format literal");let i=(c,d=2)=>String(c).padStart(d,"0"),s=c=>new Intl.DateTimeFormat(t,{timeZone:"UTC",...c}).format(r),u={...n==="H"?{}:{y:()=>String(r.getUTCFullYear()),yy:()=>i(r.getUTCFullYear()%100),yyyy:()=>i(r.getUTCFullYear(),4),M:()=>String(r.getUTCMonth()+1),MM:()=>i(r.getUTCMonth()+1),MMM:()=>s({month:"short"}),MMMM:()=>s({month:"long"}),d:()=>String(r.getUTCDate()),dd:()=>i(r.getUTCDate()),EEE:()=>s({weekday:"short"}),EEEE:()=>s({weekday:"long"})},...n==="D"?{}:{H:()=>String(r.getUTCHours()),HH:()=>i(r.getUTCHours()),h:()=>String(r.getUTCHours()%12||12),hh:()=>i(r.getUTCHours()%12||12),m:()=>String(r.getUTCMinutes()),mm:()=>i(r.getUTCMinutes()),s:()=>String(r.getUTCSeconds()),ss:()=>i(r.getUTCSeconds()),a:()=>new Intl.DateTimeFormat(t,{hour:"numeric",hour12:!0,timeZone:"UTC"}).formatToParts(r).find(c=>c.type==="dayPeriod").value}};return a.map(c=>{if(c.startsWith("'"))return c==="''"?"'":c.slice(1,-1).replaceAll("''","'");if(!/^[a-zA-Z]/.test(c))return c;if(!u[c])throw new RangeError(`Unsupported date format token: ${c}`);return u[c]()}).join("")}function Ho(r,{format:e,mask:t,locale:n,dtype:a,places:i}={}){let s=r==null?"":String(r);if(r!=null&&r!==""&&(e!=null&&e!==""||i!=null))if(typeof r=="number"||Te(r))s=jf(r,{format:e,locale:n,places:i});else{let o=Ff(r,a);if(Pf.has(e)){let l={timeZone:"UTC"};o!=="H"&&(l.dateStyle=e),o!=="D"&&(l.timeStyle=e),s=new Intl.DateTimeFormat(n||void 0,l).format(r)}else s=Uf(r,String(e),n||void 0,o)}return t==null?s:String(t).replaceAll("%s",()=>s)}function qf({format:r="decimal",places:e}={}){let t={maximumFractionDigits:20};if(!r||r==="decimal")t.style="decimal";else if(r==="percent")t.style="percent";else if(r==="scientific")t.notation="scientific";else{let n=/^(0|#,##0)(?:\.(0*)(#*))?$/.exec(r);if(!n||r.includes(".")&&!n[2]&&!n[3])throw new RangeError(`Unsupported number format: ${r}`);t.useGrouping=n[1].includes(","),t.minimumFractionDigits=(n[2]||"").length,t.maximumFractionDigits=(n[2]||"").length+(n[3]||"").length}if(e!=null&&e!==""){let n=Number(e);if(!Number.isInteger(n)||n<0||n>20)throw new RangeError("places must be an integer from 0 to 20");t.minimumFractionDigits=n,t.maximumFractionDigits=n}return t}function jf(r,e={}){if(typeof r!="number"&&!Te(r))throw new TypeError("Number formatting requires a Number or Decimal");if(!Number.isFinite(Number(r)))throw new RangeError("Number must be finite");let t=new Intl.NumberFormat(e.locale||void 0,qf(e));if(Te(r)&&new Intl.NumberFormat("en",{useGrouping:!1}).format("9007199254740993")!=="9007199254740993")throw new Error("This browser cannot format Decimal values without precision loss");return t.format(Te(r)?r.toString():r)}var zf=new Set(["style","script"]),Vf=new Set(["allowfullscreen","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","inert","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"]),Wo=new Set(["width","height","top","left","right","bottom","padding","margin","border","position","display","overflow","float","clear","resize","z_index","min_width","min_height","max_width","max_height","color","background","font","text","line_height","white_space","vertical_align","flex","gap","row_gap","column_gap","grid","align_content","justify_content","align_items","justify_items","visibility","opacity","cursor"]),Fr=new Set(["rounded","gradient","shadow","transform","transition","zoom","filter"]),Go=r=>r===!0?"true":r===!1?"false":String(r),Fn=r=>typeof r=="number"&&Number.isFinite(r)?`${r}px`:String(r);function Hf(r){if(Wo.has(r))return!0;for(let e of Wo)if(r.startsWith(`${e}_`))return!0;return!1}function Wf(r){let e=new Map;if(!r)return e;let t=[],n=0,a=null,i=!1,s=!1,o=0,l=String(r);for(let u=0;u<l.length;u+=1){let c=l[u],d=l[u+1];if(s){c==="*"&&d==="/"&&(s=!1,u+=1);continue}if(i){i=!1;continue}if(c==="\\"){i=!0;continue}if(a){c===a&&(a=null);continue}c==='"'||c==="'"?a=c:c==="/"&&d==="*"?(s=!0,u+=1):"([{".includes(c)?o+=1:")]}".includes(c)&&o>0?o-=1:c===";"&&o===0&&(t.push(l.slice(n,u)),n=u+1)}t.push(l.slice(n));for(let u of t){let c=u.trim();if(!c)continue;let d=c.indexOf(":");if(d<0)throw new TypeError(`malformed style declaration '${c}'`);e.set(c.slice(0,d).trim(),c.slice(d+1).trim())}return e}var Ur=class extends Dt{static mode="html";renderedItem(e,t,n,{tag:a,xml:i=!0,pretty:s=!1,depthOffset:o=0,includeDatapath:l=!1}={}){e.parentNode?._getMeta("subbuilder")==="html"&&(n={xmlns:"http://www.w3.org/1999/xhtml",...n});let{format:c,mask:d,locale:f,places:p,dtype:h,...m}=n;!Array.isArray(t)&&(c!=null||d!=null||p!=null)&&(t=Ho(t,{format:c,mask:d,places:p,dtype:h,locale:this._displayLocale(e,f)}));let g=this._formatAttrs(m);if(l){if(!Object.hasOwn(n,"id")){let w=this.builder.targetId(e);w!==null&&(g+=` id="${this._htmlAttrValue(w)}"`)}for(let[w,D]of Object.entries(e.getAttr()))e.pointerType(D)&&(g+=` data-${this.adapt(w)}-pointer="${this._htmlAttrValue(e.absDatapath(D))}"`)}let b=s?" ".repeat(this._nodeDepth(e,o)):"",y=s?`
|
|
24
|
-
`:"";if(e._getMeta("void"))return`${b}<${a}${g}${i?"/":""}>${y}`;if(Array.isArray(t)){let w=this._composeStringFragments(t);return`${b}<${a}${g}>${y}${w}${b}</${a}>${y}`}if(t==null)return`${b}<${a}${g}></${a}>${y}`;let v=typeof t=="string"&&t.endsWith("::HTML")?t.slice(0,-6):zf.has(a)?String(t):this._escapeText(t);return`${b}<${a}${g}>${v}</${a}>${y}`}_displayLocale(e,t){if(t)return t;for(let n=e.parentNode;n;n=n.parentNode){let a=n.getAttr("locale");if(a==null)continue;let i=n.pointerType(a)?n.data.getItem(n.absDatapath(a)):a;if(i)return i}}adaptAttrs(e){let t={},n={};for(let[i,s]of Object.entries(e||{}))if(i.startsWith(`${this.builder.constructor._name}_`))t[this.adapt(i)]=s;else if(i==="dtype")t.dtype=s;else{if(this.builder.constructor.retainedAttrPrefixes.some(o=>i.startsWith(o)))continue;this._isStyleContribution(i)?n[i]=s:t[i]=s}let a=this._adaptStyle(n);return a&&(t.style=a),t}_isStyleContribution(e){if(e==="style"||e.startsWith("style_")||Fr.has(e))return!0;let t=e.includes("_")?e.slice(0,e.indexOf("_")):null;return t!==null&&Fr.has(t)||Hf(e)}_adaptStyle(e){let t=Wf(e.style),n=new Map,a=new Map;for(let[i,s]of Object.entries(e))if(i!=="style")if(i.startsWith("style_"))t.set(i.slice(6).replaceAll("_","-"),Go(s));else if(Fr.has(i))n.set(i,s);else{let o=i.indexOf("_"),l=o<0?i:i.slice(0,o);o>=0&&Fr.has(l)?(a.has(l)||a.set(l,{}),a.get(l)[i.slice(o+1)]=s):t.set(i.replaceAll("_","-"),Go(s))}for(let i of Fr)(n.has(i)||a.has(i))&&this[`_macro_${i}`](n.get(i),a.get(i)||{},t);return[...t].map(([i,s])=>`${i}: ${s}`).join("; ")}_formatAttrs(e){let t=[];for(let[n,a]of Object.entries(e||{}))Vf.has(n)?a&&t.push(` ${n}`):t.push(` ${n}="${this._htmlAttrValue(a)}"`);return t.join("")}_htmlAttrValue(e){return(e===!0?"true":e===!1?"false":String(e)).replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""")}_macro_rounded(e,t,n){let a=e===void 0?{}:{top_left:e,top_right:e,bottom_left:e,bottom_right:e};for(let[i,s]of Object.entries(t))if(i==="top"||i==="bottom")a[`${i}_left`]=s,a[`${i}_right`]=s;else if(i==="left"||i==="right")a[`top_${i}`]=s,a[`bottom_${i}`]=s;else if(["top_left","top_right","bottom_left","bottom_right"].includes(i))a[i]=s;else throw new TypeError(`rounded: unknown sub-kwarg '${i}'`);for(let[i,s]of Object.entries(a))n.set(`border-${i.replaceAll("_","-")}-radius`,Fn(s))}_macro_transform(e,t,n){let a=e===void 0?[]:[String(e)];for(let[i,s]of Object.entries(t))i==="rotate"?a.push(`rotate(${s}deg)`):i==="scale"||i==="translate"?a.push(`${i}(${s})`):i==="translate_x"?a.push(`translateX(${Fn(s)})`):i==="translate_y"?a.push(`translateY(${Fn(s)})`):i==="skew_x"?a.push(`skewX(${s}deg)`):i==="skew_y"?a.push(`skewY(${s}deg)`):a.push(`${i.replaceAll("_","-")}(${s})`);a.length&&n.set("transform",a.join(" "))}_macro_filter(e,t,n){let a=e===void 0?[]:[String(e)];for(let[i,s]of Object.entries(t))i==="rotate"?a.push(`hue-rotate(${s}deg)`):i==="blur"?a.push(`blur(${Fn(s)})`):i==="drop_shadow"?a.push(`drop-shadow(${s})`):a.push(`${i.replaceAll("_","-")}(${s})`);a.length&&n.set("filter",a.join(" "))}_macro_transition(e,t,n){e!==void 0&&n.set("transition",String(e));for(let[a,i]of Object.entries(t))n.set(`transition-${a.replaceAll("_","-")}`,String(i))}_macro_zoom(e,t,n){e!==void 0&&n.set("zoom",String(e))}_macro_shadow(e,t,n){e!==void 0&&n.set("box-shadow",String(e));for(let[a,i]of Object.entries(t))n.set(`box-shadow-${a.replaceAll("_","-")}`,String(i))}_macro_gradient(e,t,n){e!==void 0&&n.set("background-image",String(e))}};var Gf=new Set(["alignment_baseline","baseline_shift","clip_path","clip_rule","color_interpolation","color_interpolation_filters","dominant_baseline","fill_opacity","fill_rule","flood_color","flood_opacity","font_family","font_size","font_size_adjust","font_stretch","font_style","font_variant","font_weight","glyph_orientation_horizontal","glyph_orientation_vertical","image_rendering","letter_spacing","lighting_color","marker_end","marker_mid","marker_start","overline_position","overline_thickness","paint_order","pointer_events","shape_rendering","stop_color","stop_opacity","strikethrough_position","strikethrough_thickness","stroke_dasharray","stroke_dashoffset","stroke_linecap","stroke_linejoin","stroke_miterlimit","stroke_opacity","stroke_width","text_anchor","text_decoration","text_rendering","underline_position","underline_thickness","unicode_bidi","word_spacing","writing_mode"]);function Xo(r){return Object.fromEntries(Object.entries(r||{}).map(([e,t])=>[Gf.has(e)?e.replaceAll("_","-"):e,t]))}var qr=class extends Tt{static mode="svg";adaptAttrs(e){return Xo(e)}};var Yo={document_format:{name:"builder_grammar",version:"1.1"},grammar:{name:"html",version:null,title:null,description:null},abstracts:{},elements:{svg:{doc:"Switch to the SVG dialect from this node down (BLD.2).\n\n A sub-builder element: ``_meta['subbuilder']`` switches the active\n dialect to SVG from this node down. No ``render_tag``: ``<svg>`` is\n emitted verbatim (HTML5 has a native ``<svg>`` tag).",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{subbuilder:"svg"}},a:{doc:null,sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},abbr:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},address:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},area:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},article:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},aside:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},audio:{doc:null,sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},b:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},base:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},bdi:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},bdo:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},blockquote:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},body:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},br:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},button:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},canvas:{doc:null,sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},caption:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},cite:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},code:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},col:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},colgroup:{doc:null,sub_tags:"col,script,template",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},data:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},datalist:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,option,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},dd:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},del_:{doc:null,sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},details:{doc:null,sub_tags:"summary[0:1],a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},dfn:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},dialog:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},div:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},dl:{doc:null,sub_tags:"dd,div,dt,script,template",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},dt:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},em:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},embed:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},fieldset:{doc:null,sub_tags:"legend[0:1],a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},figcaption:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},figure:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figcaption[0:1],figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},footer:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},form:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},h1:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},h2:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},h3:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},h4:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},h5:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},h6:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},head:{doc:null,sub_tags:"base[0:1],link,meta,noscript,script,style,template,title[0:1]",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},header:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},hgroup:{doc:null,sub_tags:"h1,h2,h3,h4,h5,h6,p,script,template",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},hr:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},html:{doc:null,sub_tags:"head[0:1],body[0:1]",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},i:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},iframe:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},img:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},input:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},ins:{doc:null,sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},kbd:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},label:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},legend:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,h1,h2,h3,h4,h5,h6,hgroup,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},li:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},link:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},main:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},map:{doc:null,sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},mark:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},menu:{doc:null,sub_tags:"li,script,template",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},meta:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},meter:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},nav:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},noscript:{doc:null,sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},object:{doc:null,sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},ol:{doc:null,sub_tags:"li,script,template",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},optgroup:{doc:null,sub_tags:"div,legend,noscript,option,script,template",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},option:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,div,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},output:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},p:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},picture:{doc:null,sub_tags:"img[0:1],script,source,template",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},pre:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},progress:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},q:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},rp:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},rt:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},ruby:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},s:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},samp:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},script:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},search:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},section:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},select:{doc:null,sub_tags:"button,div,hr,noscript,optgroup,option,script,template",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},slot:{doc:null,sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},small:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},source:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},span:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},strong:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},style:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},sub:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},summary:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,h1,h2,h3,h4,h5,h6,hgroup,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},sup:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},table:{doc:null,sub_tags:"caption[0:1],colgroup,script,tbody,template,tfoot[0:1],thead[0:1],tr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},tbody:{doc:null,sub_tags:"script,template,tr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},td:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},template:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,caption,cite,code,col,colgroup,data,datalist,del_,details,dfn,dialog,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,legend,li,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,optgroup,option,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,source,span,strong,style,sub,summary,sup,table,tbody,td,template,textarea,tfoot,th,thead,time,tr,track,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},textarea:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},tfoot:{doc:null,sub_tags:"script,template,tr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},th:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},thead:{doc:null,sub_tags:"script,template,tr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},time:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},title:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},tr:{doc:null,sub_tags:"script,td,template,th",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},track:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},u:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},ul:{doc:null,sub_tags:"li,script,template",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},var:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},video:{doc:null,sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},wbr:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},selectedcontent:{doc:"Mirror of the selected option for Customizable Select (HTML 2024).",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},dataSetter:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"destination",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"type",module:"builtins",name:"str"},has_default:!1},{name:"value",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"any"},has_default:!1},{name:"attr",kind:"var_keyword",role:"attribute",annotation:{kind:"any"},has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{data_element:!0}},dataFormula:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"destination",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"type",module:"builtins",name:"str"},has_default:!1},{name:"func",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"union",items:[{kind:"type",module:"builtins",name:"str"},{kind:"type",module:"collections.abc",name:"Callable"}]},has_default:!1},{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{data_element:!0}},dataController:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"func",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"union",items:[{kind:"type",module:"builtins",name:"str"},{kind:"type",module:"collections.abc",name:"Callable"}]},has_default:!1},{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{data_element:!0}}}};var Un=class extends qe{static _name="html";static _defaultRenderMode="html";static retainedAttrPrefixes=["validate_","dtype"];static{this.defineGrammar(Yo)}get renderer_html(){return new Ur(this)}};qe.registerBuilder(Un);var Zo={document_format:{name:"builder_grammar",version:"1.1"},grammar:{name:"svg",version:null,title:null,description:null},abstracts:{graphics:{doc:"SVG graphics content: any graphical element.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},_meta:null},containerElement:{doc:"SVG container content: elements that can hold children.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},_meta:null}},elements:{html:{doc:"Switch to the HTML dialect from this node down (BLD.2).\n\n A sub-builder element: ``_meta['subbuilder']`` switches the active\n dialect to HTML from this node down. The source tag ``html`` is\n rendered as ``_meta['render_tag']`` (``<foreignObject>``) carrying\n ``_meta['render_attributes']`` (the SVG namespace). The immediate\n HTML child declares XHTML so both sides of the XML boundary retain\n their native namespace.\n ",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{subbuilder:"html",render_tag:"foreignObject",render_attributes:{xmlns:"http://www.w3.org/2000/svg"}}},svg:{doc:"Root SVG container or nested SVG viewport.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},g:{doc:"Group container for applying transforms and styles.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},defs:{doc:"Container for referenced elements (gradients, patterns, etc.).",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},symbol:{doc:"Reusable graphical template, rendered only when referenced by <use>.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},use:{doc:"Reference and render a <symbol> or other element.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},rect:{doc:"Rectangle.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},circle:{doc:"Circle.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},ellipse:{doc:"Ellipse.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},line:{doc:"Line segment between two points.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},polyline:{doc:"Open shape of connected line segments.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},polygon:{doc:"Closed shape of connected line segments.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},path:{doc:"Arbitrary shape defined by path commands (d attribute).",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},image:{doc:"Embedded raster image.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},text:{doc:"Text block. Contains text content and optional <tspan>/<textPath>.",sub_tags:"tspan,textPath",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},tspan:{doc:"Inline text span within <text>.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},textPath:{doc:"Text rendered along a path shape.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},linearGradient:{doc:"Linear gradient definition. Place inside <defs>.",sub_tags:"stop",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},radialGradient:{doc:"Radial gradient definition. Place inside <defs>.",sub_tags:"stop",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},stop:{doc:"Gradient stop (color and offset).",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},pattern:{doc:"Tile pattern definition. Place inside <defs>.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},clipPath:{doc:"Clipping path definition.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},mask:{doc:"Alpha mask definition.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},marker:{doc:"Marker symbol for line endpoints or vertices.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},filter:{doc:"Filter effect container. Place inside <defs>.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feGaussianBlur:{doc:"Gaussian blur filter primitive.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feOffset:{doc:"Offset filter primitive.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feBlend:{doc:"Blend filter primitive.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feColorMatrix:{doc:"Color matrix filter primitive.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feComposite:{doc:"Composite filter primitive.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feFlood:{doc:"Flood fill filter primitive.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feMerge:{doc:"Merge filter primitive (container for feMergeNode).",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feMergeNode:{doc:"Single input for feMerge.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feDropShadow:{doc:"Drop shadow filter primitive (SVG 2).",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feDiffuseLighting:{doc:"Diffuse lighting filter primitive.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feSpecularLighting:{doc:"Specular lighting filter primitive.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},fePointLight:{doc:"Point light source for lighting filters.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feDistantLight:{doc:"Distant light source for lighting filters.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feSpotLight:{doc:"Spot light source for lighting filters.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feMorphology:{doc:"Morphology filter primitive (erode/dilate).",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feTurbulence:{doc:"Turbulence noise filter primitive.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feDisplacementMap:{doc:"Displacement map filter primitive.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feConvolveMatrix:{doc:"Convolution matrix filter primitive.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feImage:{doc:"Image filter primitive.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feTile:{doc:"Tile filter primitive.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},animate:{doc:"Animate an attribute over time.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},animateTransform:{doc:"Animate a transform attribute.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},animateMotion:{doc:"Animate motion along a path.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},set:{doc:"Set an attribute to a value for a duration.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},title:{doc:"Accessible title (tooltip in browsers).",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},desc:{doc:"Accessible description.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},metadata:{doc:"Metadata container (RDF, Dublin Core, etc.).",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},a:{doc:"Hyperlink wrapper.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},foreignObject:{doc:"Container for non-SVG content (HTML, MathML).",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},switch:{doc:"Conditional processing (renders first matching child).",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},dataSetter:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"destination",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"type",module:"builtins",name:"str"},has_default:!1},{name:"value",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"any"},has_default:!1},{name:"attr",kind:"var_keyword",role:"attribute",annotation:{kind:"any"},has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{data_element:!0}},dataFormula:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"destination",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"type",module:"builtins",name:"str"},has_default:!1},{name:"func",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"union",items:[{kind:"type",module:"builtins",name:"str"},{kind:"type",module:"collections.abc",name:"Callable"}]},has_default:!1},{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{data_element:!0}},dataController:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"func",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"union",items:[{kind:"type",module:"builtins",name:"str"},{kind:"type",module:"collections.abc",name:"Callable"}]},has_default:!1},{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{data_element:!0}}}};var qn=class extends qe{static _name="svg";static _defaultRenderMode="svg";static{this.defineGrammar(Zo)}get renderer_svg(){return new qr(this)}};qe.registerBuilder(qn);var oe="http://www.w3.org/2000/svg";var jn=new WeakMap,pt=class{#e;#n;#t=!1;#i=!1;#a=!1;#o=!1;#r=!1;#l=null;#s=0;#c=null;#f=null;#u=null;#d=()=>{this.#a&&this.#_()};constructor(e,t,{modal:n,validateContent:a}){this.host=e,this.root=t,this.modal=n,this.validateContent=a;let i=this.ownerDocument,s=this.root;s.classList.add("window-surface");let o=i.createElement("style");o.textContent=`.window-surface{display:contents;font:inherit;color:var(--gramlot-ink,CanvasText)}
|
|
20
|
+
${" ".repeat(i)}</${s}>`:`<${s}${l}>${f}</${s}>`:t===null||t.includes(s)?`<${s}${l}/>`:`<${s}${l}></${s}>`}if(u==null||u==="")return t===null||t.includes(s)?`<${s}${l}/>`:`<${s}${l}></${s}>`;let c=u instanceof Date&&!Number.isNaN(u.getTime())?kf(u):String(u),d=this._escapeXml(c);return`<${s}${l}>${d}</${s}>`}_sanitizeTag(e){return e?e.replace(/[^a-zA-Z0-9_\-.:]/g,"_"):"_none_"}_escapeXml(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}_escapeAttr(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}static fromXml(e,t={}){let{tagAttribute:n=null}=t,i;if(typeof DOMParser<"u"){i=new DOMParser().parseFromString(e,"application/xml");let s=i.querySelector("parsererror");if(s)throw new Error(`XML parse error: ${s.textContent}`)}else i=new ko.DOMParser().parseFromString(e,"application/xml");return this._xmlElementToBag(i.documentElement,n)}static _xmlElementToBag(e,t=null){let n=new this,i=Array.from(e.childNodes).filter(a=>a.nodeType===1);for(let a of i){let s=a.tagName,o={};for(let m=0;m<a.attributes.length;m++){let g=a.attributes[m];o[g.name]=g.value}let l=Ln(o._resolver);l&&delete o._resolver;let u=String(o._T||"").toUpperCase()==="BAG";Object.assign(o,Ji(o));let c=s;"_tag"in o&&(c=o._tag,delete o._tag),t&&t in o&&(c=o[t],delete o[t]);let d=c,f=1;for(;n.getNode(c);)c=`${d}_${f++}`;let p=Array.from(a.childNodes).filter(m=>m.nodeType===1),h;if(p.length>0||u){let m=this._xmlElementToBag(a,t);h=n.setItem(c,m,Object.keys(o).length>0?o:null)}else{let m=a.textContent||"";h=n.setItem(c,m,Object.keys(o).length>0?o:null)}l&&(h.resolver=l),h.xmlTag=s}return n}static async fromUrl(e,t={}){let{timeout:n=30}=t,i={};n&&(i.signal=AbortSignal.timeout(n*1e3));let a=await fetch(e,i),s=a.headers.get("content-type")||"",o=await a.text();if(s.includes("json"))return r.fromTytx(o);if(s.includes("xml"))return r.fromXml(o);let l=o.trim();if(l.startsWith("<"))return r.fromXml(o);if(l.startsWith("{")||l.startsWith("["))return r.fromTytx(o);throw new Lr(`Unsupported content-type: ${s}`)}toJson(e=!0){let t=[];for(let n of this._nodes)t.push(this._nodeToJsonDict(n,e));return e?Ee(t):JSON.stringify(t)}_nodeToJsonDict(e,t){let n=e.resolver?null:e.getValue(!0);if(n&&typeof n._nodeToJsonDict=="function"){let a=[];for(let s of n._nodes)a.push(n._nodeToJsonDict(s,t));n=a}let i={label:e.label,value:n,attr:Pn(e.attr)};return e.nodeTag!==null&&(i.tag=e.nodeTag),e.resolver&&(i.resolver=Rr(e.resolver)),i}static fromJson(e,t={}){return Eo||(console.warn("Bag.fromJson is deprecated; use Bag.fromTytx"),Eo=!0),this.fromTytx(e,"json",t)}toStringTree(e=!0,t=null,n="",i=!0){t===null&&(t=new Map);let a=[],s=[...this._nodes];for(let o=0;o<s.length;o++){let l=s[o],u=o===s.length-1,c=l.getValue(e),d=l.getAttr(),f="",p=Object.keys(d);p.length>0&&(f=" ["+p.map(b=>`${b}=${JSON.stringify(d[b])}`).join(", ")+"]");let h=u?"\u2514\u2500\u2500 ":"\u251C\u2500\u2500 ",m=n+(u?" ":"\u2502 ");if(c instanceof r){let g=l,b=c.backref?"(*)":"";if(t.has(g))a.push(`${n}${h}${l.label}${b}${f} \u2192 (circular ref)`);else{t.set(g,l.label),a.push(`${n}${h}${l.label}${b}${f}`);let y=c.toStringTree(e,t,m,u);y&&a.push(y)}}else{let g;if(c===null)g="null";else if(c===void 0)g="undefined";else if(c instanceof ArrayBuffer||c instanceof Uint8Array){let b=new TextDecoder("utf-8",{fatal:!1}),y=c instanceof ArrayBuffer?new Uint8Array(c):c;g=b.decode(y)}else typeof c=="string"?c.length>50?g=JSON.stringify(c.slice(0,47)+"..."):g=JSON.stringify(c):g=String(c);a.push(`${n}${h}${l.label}: ${g}${f}`)}}return a.join(`
|
|
21
|
+
`)}toString(e=!0,t=null,n=""){t||(t=new Set);let i=[],a=[...this._nodes];for(let s=0;s<a.length;s++){let o=a[s],l=s===a.length-1,u=o.getValue(e),c="",d=o.attr;d&&Object.keys(d).length>0&&(c=` [${Object.entries(d).map(([m,g])=>`${m}=${JSON.stringify(g)}`).join(", ")}]`);let f=l?"\u2514\u2500\u2500 ":"\u251C\u2500\u2500 ",p=n+(l?" ":"\u2502 ");if(u&&typeof u._htraverse=="function"){let h=o;if(t.has(h))i.push(`${n}${f}${o.label}${c} \u2192 (circular ref)`);else{t.add(h),i.push(`${n}${f}${o.label}${c}`);let m=u.toString(e,t,p);m&&i.push(m)}}else{let h;u==null?h="null":typeof u=="string"&&u.length>50?h=JSON.stringify(u.slice(0,47)+"..."):typeof u=="string"?h=JSON.stringify(u):h=String(u),i.push(`${n}${f}${o.label}: ${h}${c}`)}}return i.join(`
|
|
22
|
+
`)}},Lr=class extends Error{constructor(e){super(e),this.name="BagException"}};se.registerBagClass(le);Yi(le,"X",r=>r._toTytxPayload(),r=>le._fromTytxPayload(r));Ir(le.tytxSuffix,{...Ge(le.tytxSuffix),Bag:le});var Do=new Set(["False","None","True","and","as","assert","async","await","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","nonlocal","not","or","pass","raise","return","try","while","with","yield"]);function To(r){return r.endsWith("_")&&Do.has(r.slice(0,-1))?r.slice(0,-1):r}function Co(r){let e=To(r);return e!==r?e:r.startsWith("_")&&Do.has(r.slice(1))?r.slice(1):r}function ta(r,{renderTag:e=null,ns:t=null,dialectName:n=null}={}){let i=e||r;if(!i)return i;if(i=To(i),t&&!e){let a=`${n}_`;i.startsWith(a)&&(i=i.slice(a.length)),i=`${t}:${i}`}return i}var tr=Symbol("value"),So=new Set(["_meta","datapath","nodeId","ns","form","formId","_anchor","updateOn"]);function ra(r){return Object.entries(r||{}).filter(([e])=>!So.has(e)).map(([e,t])=>[Co(e),t])}var er=class extends Xe{constructor(e,t,n=null,i=null,a=null,s=null,o=null){super(e,t,n,i,a,s,o),this._builder=e?._insertingBuilder??e?._builder??null,this._targetId=null}get builder(){if(this._builder)return this._builder;let e=this.parentBag;return e?e._builder:null}get data(){return this.builder.data}get rootBuilder(){return this.parentBag.root._builder}_getMeta(e){let t=this.getAttr("_meta")||{},n=e.split(",").map(i=>i.trim());return n.length===1?t[n[0]]!==void 0?t[n[0]]:null:n.map(i=>t[i]!==void 0?t[i]:null)}pointerType(e){return typeof e=="string"&&(e[0]==="^"||e[0]==="=")&&!e.startsWith("==")?e[0]:null}pointers(){this.builder.validateCustomTypes(this);let e=[];for(let[t,n]of Object.entries(this.getAttr()||{}))this.pointerType(n)==="^"&&e.push([t,n.split(":",1)[0]]);return this.pointerType(this.value)==="^"&&e.push(["",this.value.split(":",1)[0]]),e}fixedAttrItems(){return ra(this.getAttr())}runtimeToEvaluate(){let e=new Map(this.fixedAttrItems());return e.set(tr,this.value),e}absDatapath(e){let t=e;this.pointerType(e)&&(e=(Qe(e)?.pointer??e).slice(1));let n=null;return e.includes("?")&&([e,n]=e.split("?",2)),e.startsWith("#")?this._finalizeAbsPath(this._resolveSymbolicDatapath(e,t),n):(e.startsWith(".")&&(e=this._composeRelativeDatapath(e,t)),this._finalizeAbsPath(e,n))}_finalizeAbsPath(e,t){return e=this._collapseParentDatapath(e,e),t?`${e}?${t}`:e}_composeRelativeDatapath(e,t){let n=this;for(;n!==null&&e.startsWith(".");){let i=n.getAttr("datapath");i!=null&&(e=e==="."?i:i+e),n=n.parentNode}if(e.startsWith("."))throw new Error(`unresolved relative datapath: ${t}`);return e}_collapseParentDatapath(e,t){let n=[];for(let i of e.split("."))if(i==="#parent"){if(n.length===0)throw new Error(`#parent has no segment to cancel: ${t}`);n.pop()}else n.push(i);return n.join(".")}_resolveSymbolicDatapath(e,t){let n=e.slice(1),i=n.indexOf("."),a=i===-1?n:n.slice(0,i),s=i===-1?"":n.slice(i+1),o;if(a==="FORM")o=this._findMarkedDatapathAncestor(!0,!1,t);else if(a==="ANCHOR")o=this._findMarkedDatapathAncestor(!1,!0,t);else{let l=this.rootBuilder;if(!l)throw new Error(`#<id>: cannot resolve ${t} on a node without builder`);if(o=l.source.getNodeByAttr("nodeId",a),o==null)throw new Error(`#<id>: cannot resolve ${t}`)}return o.absDatapath(s?`.${s}`:".")}_findMarkedDatapathAncestor(e,t,n){let i=this;for(;i!=null;){let s=i.getAttr()||{};if(e&&(s.formId!=null||s.form===!0)||t&&"_anchor"in s)return i;i=i.parentNode}let a=e?"FORM":"ANCHOR";throw new Error(`#${a}: no marked ancestor found for ${n}`)}getRelativeData(e,t=null,{autocreate:n=!1}={}){let i=this.data,a=this.absDatapath(e);return n&&i.getItem(a)==null&&i.setItem(a,t),i.getItem(a,t)}setRelativeData(e,t,{attributes:n=null,fired:i=!1,reason:a=null}={}){let s=this.data,o=this.absDatapath(e);s.setItem(o,t,n,">",!1,!0,a===null?!0:a,i)}fireEvent(e,t=!0,{attributes:n=null,reason:i=null}={}){this.setRelativeData(e,t,{attributes:n,fired:!0,reason:i})}SET(e,t){this.setRelativeData(e,t)}GET(e){return this.getRelativeData(e)}PUT(e,t){this.setRelativeData(e,t,{reason:!1})}FIRE(e,t=!0){this.setRelativeData(e,t,{fired:!0})}},J=class r extends le{constructor(e=null,t=null){super(e),this._builder=t,this._insertingBuilder=null}get nodeClass(){return er}_setBuilderItem(e,t,n,...i){let a=t?.map(([o])=>[o,o._builder])||null;if(t)for(let[o,l]of t)o._builder=l;let s=this._insertingBuilder;this._insertingBuilder=e;try{return this.setItem(n,...i)}catch(o){if(this.node(n)==null&&a)for(let[l,u]of a)l._builder=u;throw o}finally{this._insertingBuilder=s}}bindBuilder(e){if(!e)throw new Error("SourceBag.bindBuilder requires a builder");let t=this._builderBindingPlan(e);for(let[n,i]of t)n._builder=i;return this.setBackref(),this}_builderBindingPlan(e){let t=[],n=new WeakSet,i=(a,s)=>{if(n.has(a))throw new Error("source contains a cyclic or shared SourceBag branch");n.add(a),t.push([a,s]);for(let o of a.getNodes()){let l=s,u=o._getMeta("subbuilder");u!=null&&(l=s._resolveSubbuilderReference(u,o.getAttr()||{},o.nodeTag)),t.push([o,l]);let c=o.getValue(!0);c instanceof r&&i(c,l)}};return i(this,e),t}};if((Ge(J.tytxSuffix).SourceBag??J)!==J)throw new Error("TYTX subtype name 'SourceBag' is already registered for another class");Ir(J.tytxSuffix,{...Ge(J.tytxSuffix),SourceBag:J});function Cf(r){if(r.length===0)return{value:null,attrs:{}};let e=r[0];if(e!==null&&typeof e=="object"){let t=Object.getPrototypeOf(e);if(t===Object.prototype||t===null)return{value:null,attrs:e}}return{value:e,attrs:r[1]||{}}}var Nf=new Set(["then","toJSON"]),Io=new WeakMap;function Pr(r){return Io.get(r)||r}function na(r){if(r==null)return r;r=Pr(r);let e=r._builder||r.parentBag&&r.parentBag._builder;return e?e.wrapSource(r):r}function Bo(r,e){let t=e instanceof le,n=new Proxy(e,{get(i,a){if(typeof a=="symbol"||a.startsWith("_")||Nf.has(a))return Reflect.get(i,a,i);let s=r.schemaTag(a);if(t&&s)return No(r,i,s,t);if(a in i){let l=Reflect.get(i,a,i);return typeof l=="function"?l.bind(i):l}if(s)return No(r,i,s,t);let o=r.containerMethod(a);if(o)return(...l)=>r[o](r.wrapSource(i),...l)}});return Io.set(n,e),n}function No(r,e,t,n){return(...i)=>{let{value:a,attrs:s}=Cf(i),o=n?r.bagCall(e,t,a,s):r.commandOnNode(e,t,a,s);return o.builder.wrapSource(o)}}var Mo=/^[A-Za-z_][A-Za-z0-9_]*$/,Sf=new Set(["positional_only","positional_or_keyword","keyword_only","var_positional","var_keyword"]),If=new Set(["framework","value","attribute"]),Bf=new Map([["builtins.str",r=>typeof r=="string"],["builtins.int",r=>Number.isInteger(r)],["builtins.float",r=>typeof r=="number"&&Number.isFinite(r)],["builtins.bool",r=>typeof r=="boolean"],["builtins.list",r=>Array.isArray(r)],["builtins.dict",r=>r!==null&&typeof r=="object"&&!Array.isArray(r)],["builtins.tuple",r=>Array.isArray(r)],["builtins.set",r=>Array.isArray(r)||r instanceof Set],["builtins.NoneType",r=>r===null],["builtins.object",r=>!0]]);function kt(r){return r!==null&&typeof r=="object"&&!Array.isArray(r)}function E(r,e){throw new TypeError(`${r}: ${e}`)}function Ue(r,e,t,n){kt(r)||E(n,"must be an object");for(let i of Object.keys(r))e.includes(i)||E(n,`unknown field '${i}'`);for(let i of t)Object.hasOwn(r,i)||E(n,`missing field '${i}'`)}function At(r,e){if(!(r===null||typeof r=="string"||typeof r=="boolean")&&!(typeof r=="number"&&Number.isFinite(r))){if(Array.isArray(r))return r.forEach((t,n)=>At(t,`${e}[${n}]`));if(kt(r))return Object.entries(r).forEach(([t,n])=>At(n,`${e}.${t}`));E(e,"must be lossless JSON data")}}function Of(r,e){let t="",n=!1;for(let i=0;i<r.length;i++){let a=r[i];if(a==="\\"){t+=a+(r[++i]??"");continue}a==="["&&(n=!0),!n&&a==="."&&!(e&16)?t+="[^\\n]":!n&&a==="^"&&e&8?t+="(?:^|(?<=\\n))":!n&&a==="$"?t+=e&8?"(?=\\n|(?![\\s\\S]))":"(?=\\n?(?![\\s\\S]))":t+=a,a==="]"&&(n=!1)}return t}function Et(r,e,t=!1,n=null){if(r===null)return null;switch(Ue(r,["kind","dtype","module","name","origin","arguments","items","values","base","metadata","pattern","flags","ge","le","gt","lt","value"],["kind"],e),r.kind){case"custom":return Ue(r,["kind","name"],["kind","name"],e),n||E(e,"custom references require a catalog; nested catalog references are unsupported"),n.resolve(r.name,e);case"dtype":{Ue(r,["kind","dtype"],["kind","dtype"],e);let i=r.dtype;typeof i!="string"&&E(e,"dtype must be a string");let a=Sr(i);return!a&&i!=="NN"&&E(e,`unknown dtype '${i}'`),{...r,test:o=>i==="NN"?o===null:i==="N"?Te(o)&&!["NaN","Infinity","-Infinity"].includes(o.toString()):a===Number?typeof o=="number"&&Number.isFinite(o)&&(i!=="L"||Number.isInteger(o)):a===String?typeof o=="string":a===Boolean?typeof o=="boolean":a===Date?o instanceof Date&&Number.isFinite(o.getTime()):a===Object?kt(o)&&[Object.prototype,null].includes(Object.getPrototypeOf(o)):o instanceof a}}case"any":return{...r,test:i=>!0};case"type":{(typeof r.module!="string"||typeof r.name!="string")&&E(e,"type requires string module/name");let i=`${r.module}.${r.name}`;if(i==="collections.abc.Callable")return{...r,test:s=>typeof s=="function",portable:!1};let a=Bf.get(i);return a||E(e,`unsupported type '${i}'`),{...r,test:a}}case"union":{(!Array.isArray(r.items)||!r.items.length)&&E(e,"union items must be non-empty");let i=r.items.map((a,s)=>Et(a,`${e}.items[${s}]`,!0,n));return{...r,items:i,inputConstraint:i.some(a=>a.inputConstraint),test:a=>i.some(s=>s.test&&s.test(a))}}case"literal":return Array.isArray(r.values)||E(e,"literal values must be an array"),r.values.forEach((i,a)=>At(i,`${e}.values[${a}]`)),{...r,test:i=>r.values.some(a=>Object.is(a,i))};case"annotated":{Array.isArray(r.metadata)||E(e,"annotated metadata must be an array"),r.metadata.some(s=>!["regex","range","value"].includes(s?.kind))&&E(e,"unsupported annotation metadata kind");let i=Et(r.base,`${e}.base`,!0,n),a=r.metadata.map((s,o)=>Et(s,`${e}.metadata[${o}]`,!0,n));return{...r,base:i,metadata:a,inputConstraint:i.inputConstraint,test:s=>i.test(s)&&a.every(o=>!o.test||o.test(s))}}case"range":{for(let i of["ge","le","gt","lt"])Object.hasOwn(r,i)||E(e,`range missing '${i}'`);for(let i of["ge","le","gt","lt"])r[i]!==null&&(typeof r[i]!="number"||!Number.isFinite(r[i]))&&E(e,`${i} must be finite number or null`);return{...r,test:i=>typeof i=="number"&&(r.ge===null||i>=r.ge)&&(r.le===null||i<=r.le)&&(r.gt===null||i>r.gt)&&(r.lt===null||i<r.lt)}}case"regex":{(typeof r.pattern!="string"||!Number.isInteger(r.flags)||r.flags<0)&&E(e,"regex requires pattern and non-negative integer flags");let i=r.flags&-59;i&&E(e,`unsupported Python regex flags ${i}`),r.flags&2&&E(e,"IGNORECASE is not portable across Python and JavaScript Unicode rules"),/\\[AZzUwWdDsSabBN0-9]|\(\?P[<=!]|\(\?\(|\(\?>|\(\?#|\(\?[aiLmsux-]|[+*?}]\+|\{,/.test(r.pattern.replaceAll(String.raw`[\s\S]`,"."))&&E(e,"regex uses a non-portable construct or character class");let a="uy";r.flags&16&&(a+="s");let s;try{s=new RegExp(`(?:${Of(r.pattern,r.flags)})(?![\\s\\S])`,a)}catch(o){E(e,`invalid portable regex: ${o.message}`)}return{...r,test:o=>typeof o!="string"?!1:(s.lastIndex=0,s.test(o))}}case"value":return At(r.value,`${e}.value`),{...r};case"generic":{let i=Et(r.origin,`${e}.origin`,!0,n);(r.origin?.kind!=="type"||r.origin.module!=="builtins"||!["list","dict","tuple","set"].includes(r.origin.name))&&E(e,"only list, dict, tuple and set generic origins are supported"),Array.isArray(r.arguments)||E(e,"generic arguments must be an array");let a=r.arguments.map((s,o)=>Et(s,`${e}.arguments[${o}]`,!0,n));return{...r,origin:i,arguments:a,inputConstraint:a.some(s=>s.inputConstraint),test:s=>i.test(s)&&Mf(r.origin,a,s)}}case"arguments":E(e,"Callable argument-list descriptors are not supported by Python validation");case"ellipsis":return t||E(e,"ellipsis is only valid as a nested descriptor"),{...r};default:E(e,`unknown annotation kind '${r.kind}'`)}}function Mf(r,e,t){let n=`${r.module}.${r.name}`;return n==="builtins.tuple"&&e.length&&e[1]?.kind!=="ellipsis"?t.length===e.length&&t.every((i,a)=>e[a].test(i)):n==="builtins.list"||n==="builtins.set"||n==="builtins.tuple"?[...t].every(i=>!e[0]?.test||e[0].test(i)):n==="builtins.dict"?Object.entries(t).every(([i,a])=>(!e[0]?.test||e[0].test(i))&&(!e[1]?.test||e[1].test(a))):!1}function Ro(r,e){if(r===null)return null;if(typeof r!="string"&&E(e,"must be string or null"),r==="")return new Map;let t=new Map;for(let n of r.split(",")){let i=n.trim();/^[A-Za-z_][A-Za-z0-9_]*\[\]$/.test(i)&&E(e,`invalid cardinality item '${n}'`);let a=i.match(/^([A-Za-z_][A-Za-z0-9_]*|\*)(?:\[(?:(\d+)|(?:(\d*):(\d*)))\])?$/);a||E(e,`invalid cardinality item '${n}'`);let[,s,o,l,u]=a;t.has(s)&&E(e,`duplicate tag '${s}'`);let c=0,d=1/0;i.includes("[")&&(i.includes(":")?(c=l?Number(l):0,d=u?Number(u):1/0):c=d=Number(o)),d<c&&E(e,`maximum ${d} is below minimum ${c}`),t.set(s,{min:c,max:d})}return t.has("*")&&t.size>1&&E(e,"wildcard '*' cannot be combined with named tags"),t}function Lo(r,e){if(r===null)return null;typeof r!="string"&&E(e,"must be string or null");let t=new Set;for(let n of r.split(",")){let i=n.trim();i&&((!Mo.test(i)||t.has(i))&&E(e,`invalid or duplicate parent '${n}'`),t.add(i))}return t}function Rf(r,e,t){if(r===null)return null;Ue(r,["parameters","accepts_var_keyword","accepts_var_positional"],[],e);let n=r.parameters??[];Array.isArray(n)||E(e,"parameters must be an array"),r={parameters:n,accepts_var_keyword:n.some(l=>l.kind==="var_keyword"),accepts_var_positional:n.some(l=>l.kind==="var_positional"),...r},(!Array.isArray(r.parameters)||typeof r.accepts_var_keyword!="boolean"||typeof r.accepts_var_positional!="boolean")&&E(e,"invalid signature descriptor");let i=new Set,a=!1,s=!1,o=r.parameters.map((l,u)=>{let c=`${e}.parameters[${u}]`;return Ue(l,["name","kind","role","annotation","has_default","default"],["name","kind","role","annotation","has_default"],c),(typeof l.name!="string"||!Mo.test(l.name)||i.has(l.name))&&E(c,"invalid or duplicate parameter name"),i.add(l.name),(!Sf.has(l.kind)||!If.has(l.role)||typeof l.has_default!="boolean")&&E(c,"invalid kind, role, or has_default"),l.has_default!==Object.hasOwn(l,"default")&&E(c,"default presence must equal has_default"),l.has_default&&At(l.default,`${c}.default`),a||=l.kind==="var_keyword",s||=l.kind==="var_positional",{...l,annotation:Et(l.annotation,`${c}.annotation`,!1,t)}});return(a!==r.accepts_var_keyword||s!==r.accepts_var_positional)&&E(e,"variadic summary flags do not match parameters"),{...r,parameters:o}}function Oo(r,e,t,n){let i=["doc","sub_tags","parent_tags","inherits_from","ns","attributes",...t?["node_label","collection_key"]:[],"_meta"];Ue(r,i,[],e),r={...Object.fromEntries(i.map(a=>[a,null])),...r};for(let a of["doc","inherits_from","ns",...t?["node_label","collection_key"]:[]])r[a]!==null&&typeof r[a]!="string"&&E(e,`${a} must be string or null`);return r._meta!==null&&(kt(r._meta)||E(e,"_meta must be object or null"),At(r._meta,`${e}._meta`)),Ro(r.sub_tags,`${e}.sub_tags`),Lo(r.parent_tags,`${e}.parent_tags`),{...r,attributes:Rf(r.attributes,`${e}.attributes`,n)}}function Po(r){return r?r.split(",").map(e=>e.trim()).filter(Boolean):[]}function $o(r,e){let t={...e};for(let[n,i]of Object.entries(r))n==="inherits_from"||n.startsWith("_")||t[n]||(t[n]=i);return t._meta={...r._meta||{},...e._meta||{}},t}function Fo(r){let e={...r};return e._subSpec=Object.hasOwn(e,"sub_tags")?Ro(e.sub_tags,"resolved.sub_tags"):null,e._parentSpec=Object.hasOwn(e,"parent_tags")?Lo(e.parent_tags,"resolved.parent_tags"):null,e}function Uo(r,e,t,n){if(t.get(r)===1&&E(n,`inheritance cycle at '${r}'`),t.get(r)===2)return e[r];let i=e[r];i||E(n,`unknown abstract '${r}'`),t.set(r,1);let a={...i};for(let s of Po(i.inherits_from))a=$o(Uo(s,e,t,n),a);return a=Fo(a),t.set(r,2),e[r]=a,a}function ia({abstracts:r={},elements:e={}}){let t={...r},n=new Map;for(let a of Object.keys(t))Uo(a,t,n,`abstracts.${a}.inherits_from`);let i={};for(let[a,s]of Object.entries(e)){let o={...s};for(let l of Po(s.inherits_from)){let u=t[l];u||E(`elements.${a}.inherits_from`,`unknown abstract '${l}'`),o=$o(u,o)}i[a]=Fo(o)}return{abstracts:t,elements:i}}function aa(r){Ue(r,["document_format","grammar","abstracts","elements","custom_types"],["document_format","grammar","abstracts","elements"],"grammar document"),Ue(r.document_format,["name","version"],["name","version"],"document_format"),(r.document_format.name!=="builder_grammar"||!["1.1","1.2"].includes(r.document_format.version))&&E("document_format","expected builder_grammar version 1.1 or 1.2"),Ue(r.grammar,["name","version","title","description"],["name","version","title","description"],"grammar"),(typeof r.grammar.name!="string"||!r.grammar.name)&&E("grammar.name","must be non-empty string");for(let i of["version","title","description"])r.grammar[i]!==null&&typeof r.grammar[i]!="string"&&E(`grammar.${i}`,"must be string or null");(!kt(r.abstracts)||!kt(r.elements))&&E("grammar document","abstracts/elements must be objects"),Object.hasOwn(r,"custom_types")&&r.document_format.version!=="1.2"&&E("custom_types","requires version 1.2");let e=$n.fromJSON(r.custom_types??{}),t={};for(let[i,a]of Object.entries(r.abstracts))(!i||i.startsWith("_"))&&E("abstracts",`invalid public name '${i}'`),t[i]=Oo(a,`abstracts.${i}`,!1,e);let n={};for(let[i,a]of Object.entries(r.elements))(!i||i.startsWith("_"))&&E("elements",`invalid public name '${i}'`),n[i]=Oo(a,`elements.${i}`,!0,e);return{grammar:structuredClone(r.grammar),abstracts:t,elements:n}}function qo(r,e,t,n){let i=e.attributes;if(!i)return;let a={...n};t!=null&&(a.node_value=t);let s=new Set(i.parameters.filter(u=>u.role==="attribute").map(u=>u.name)),o=new Set(["node_label","node_position","nodeId","target_id","datapath","iterate","store","_tag","_meta","ns"]);if(!i.accepts_var_keyword)for(let u of Object.keys(n))!s.has(u)&&!o.has(u)&&E(r,`unknown attribute '${u}'`);let l=e._meta?.component?i.parameters.find(u=>u.role!=="framework"&&["positional_only","positional_or_keyword"].includes(u.kind))?.name:null;for(let u of i.parameters){if(u.name===l||u.role==="framework"||u.kind.startsWith("var_"))continue;let c=Object.hasOwn(a,u.name);!c&&!u.has_default&&E(r,`missing required ${u.role} '${u.name}'`),c&&u.annotation!==null&&(!u.annotation.test||!u.annotation.test(a[u.name]))&&E(r,`invalid value for ${u.role} '${u.name}'`)}}var $n=class r{#e=new Map;#n=new Map;register(e,t,n){let i=new Map([[String,"str"],[Number,"float"],["string","str"],["integer","int"],["number","float"]]),a=i.has(t)?{kind:"type",module:"builtins",name:i.get(t)}:t;return this.#t(e,{kind:"annotated",base:a,metadata:[n]})}#t(e,t){(typeof e!="string"||!/^[A-Za-z][A-Za-z0-9_]*$/.test(e)||e in this||["to_dict","from_dict"].includes(e)||Lf.has(e))&&E("custom_types",`invalid, reserved or duplicate name '${e}'`),Ue(t,["kind","base","metadata"],["kind","base","metadata"],`custom_types.${e}`),(t.kind!=="annotated"||!Array.isArray(t.metadata)||t.metadata.length!==1||!["regex","range"].includes(t.metadata[0]?.kind))&&E(`custom_types.${e}`,"requires an annotated base with one Regex or Range validator");let n=t.metadata[0].kind==="regex"?["str"]:["int","float"];(t.base?.kind!=="type"||t.base.module!=="builtins"||!n.includes(t.base.name))&&E(`custom_types.${e}`,"portable Regex requires str; portable Range requires int or float"),At(t,`custom_types.${e}`);let i=structuredClone(t),a=Et(i,`custom_types.${e}`),s=Object.freeze({kind:"custom",name:e});return Object.defineProperty(this,e,{value:s,enumerable:!0}),this.#e.set(e,i),this.#n.set(e,{...s,inputConstraint:!0,test:a.test}),s}resolve(e,t="custom_types"){return this.#n.has(e)||E(t,`unknown custom type '${e}'`),{...this.#n.get(e)}}validate(e,t){return this.resolve(e).test(t)||E(`custom_types.${e}`,"invalid input value"),!0}toJSON(){return structuredClone(Object.fromEntries(this.#e))}static fromJSON(e){kt(e)||E("custom_types","must be an object");let t=new r;for(let[n,i]of Object.entries(e))t.#t(n,i);return t}},Lf=new Set("False None True and as assert async await break class continue def del elif else except finally for from global if import in is lambda nonlocal not or pass raise return try while with yield".split(" "));function jo(r,e,t,n){let i=e?.attributes;if(i)for(let a of i.parameters){if(!a.annotation?.inputConstraint||a.role==="framework"||["var_keyword","var_positional"].includes(a.kind))continue;let s=a.role==="value"?t:n[a.name];s!==void 0&&(a.annotation.test(s)||E(r,`invalid input for '${a.name}' (custom type)`))}}function zo(r,e,t=[]){if(e===null)return structuredClone(r);if(t.length===2&&t[0]==="custom_types"&&r!==void 0){if(!sa(r,e))throw new TypeError(`conflicting custom type '${t[1]}'`);return structuredClone(r)}if(t.length===2&&["abstracts","elements"].includes(t[0]))return structuredClone(e);if(Ye(r)&&Ye(e)){let n=structuredClone(r);for(let[i,a]of Object.entries(e))a!==null&&Object.defineProperty(n,i,{value:zo(n[i],a,[...t,i]),enumerable:!0,writable:!0,configurable:!0});return n}return structuredClone(e)}function sa(r,e){return Object.is(r,e)?!0:Array.isArray(r)&&Array.isArray(e)?r.length===e.length&&r.every((t,n)=>sa(t,e[n])):Ye(r)&&Ye(e)?Object.keys(r).length===Object.keys(e).length&&Object.keys(r).every(t=>Object.hasOwn(e,t)&&sa(r[t],e[t])):!1}function Ye(r){return r!==null&&typeof r=="object"&&!Array.isArray(r)&&Object.getPrototypeOf(r)===Object.prototype}function oa(r){if(!(r===null||typeof r=="string"||typeof r=="boolean")&&!(typeof r=="number"&&Number.isFinite(r))){if(Array.isArray(r)){r.forEach(oa);return}if(Ye(r)){Object.values(r).forEach(oa);return}throw new TypeError("collection must contain only finite JSON values")}}var Ze=class r{#e;constructor(e){oa(e);let t=["document_format","grammar","abstracts","elements"];if(!Ye(e)||Object.keys(e).some(i=>![...t,"custom_types"].includes(i))||t.some(i=>!Object.hasOwn(e,i)))throw new TypeError("collection requires document_format, grammar, abstracts and elements");let n=e.document_format;if(!Ye(n)||Object.keys(n).length!==2||n.name!=="builder_grammar"||!["1.1","1.2"].includes(n.version))throw new TypeError("expected builder_grammar version 1.1 or 1.2");for(let i of["grammar","abstracts","elements"])if(!Ye(e[i]))throw new TypeError(`${i} must be an object`);if(Object.hasOwn(e,"custom_types")&&(n.version!=="1.2"||!Ye(e.custom_types)))throw new TypeError("custom_types requires an object catalog and version 1.2");this.#e=structuredClone(e)}update(e){let t=new r(e),n=zo(this.#e,t.#e);return(this.#e.document_format.version==="1.2"||t.#e.document_format.version==="1.2")&&(n.document_format.version="1.2"),this.#e=n,this}toDocument(){return structuredClone(this.#e)}};var Dt=class{static renderType="string";static mode=null;constructor(e){this._builder=e,this.renders=new Map([[e,this]])}get builder(){return this._builder}get renderType(){return this.constructor.renderType}get mode(){return this.constructor.mode}addRender(e,t){this.renders.set(e,t)}getRender(e){let t=this.renders.get(e);if(t!==void 0)return t;let n=e.getRenderer();return this.renders.set(e,n),n}render(e,t={}){let n=e.builder,[i,a]=n.runtimeValues(e);if(e._getMeta("data_element"))return null;if(e._getMeta("component"))return this._renderComponent(e,a,t);let s=this.getRender(n),o;return[o,a]=s._handleMeta(e,a),e._getMeta("subbuilder")||(a=s.adaptAttrs(a)),e.value instanceof J&&(i=this.renderChildren(e.value,t)),s.renderedItem(e,i,a,{tag:o,...t})}renderChildren(e,t={}){let n=[];for(let i of e.getNodes()){let a=this.render(i,t);a!==null&&(Array.isArray(a)?n.push(...a):n.push(a))}return n}_renderComponent(e,t,n){let[i,a,s,o]=this._expansionInputs(e,t);if(!Object.hasOwn(e.getAttr(),"iterate"))return this._expandBlock(e,i,s,o,n);if(a==null)return[];if(!(a instanceof le))throw new TypeError(`component '${e.nodeTag}': iterate must resolve to a Bag, got ${a?.constructor?.name||typeof a}`);return a.getNodes().map(l=>this._expandBlock(e,i,s,{node_label:l.label},n))}_expansionInputs(e,t){let n=e.builder,i=n.componentMethod(e.nodeTag),a=i&&n[i];if(typeof a!="function")throw new Error(`component '${e.nodeTag}' has no implementation`);let s=t.iterate;delete t.iterate,delete t.store;let o=e.getAttr("iterate")||e.getAttr("store");o!=null?(e.pointerType(o)&&(o=o.slice(1)),o.startsWith(".")&&(o=e._composeRelativeDatapath(o,o))):o=null;for(let l of Object.keys(t)){let u=e.getAttr(l);e.pointerType(u)==="^"&&(t[l]=`^${e.absDatapath(u)}`)}return[a,s,o,t]}_expandBlock(e,t,n,i,a){let s=e.builder._expansionRoot(n);t.call(e.builder,na(s),i);let o=s.getNodes();if(o.length!==1)throw new Error(`component '${e.nodeTag}' must build a tree, not a forest: ${o.length} root nodes`);let l={...a,depthOffset:this._nodeDepth(e,a.depthOffset||0)};return this.render(o[0],l)}preprocess(e){return e}renderedItem(e,t,n,i){throw new Error(`${this.constructor.name} does not implement renderedItem`)}_handleMeta(e,t){let[n,i]=e._getMeta("render_tag,render_attributes"),a=ta(e.nodeTag,{renderTag:n,ns:e.getAttr("ns"),dialectName:e.builder?.constructor._name});if(!a)throw new Error(`node ${e.label} has no tag to render (no render_tag, no node_tag)`);return i&&(t={...t,...i}),[a,t]}adaptAttrs(e){return e}adapt(e){let t=`${this.builder.constructor._name}_`;return e.startsWith(t)?e.slice(t.length):e}finalize(e,t=null,n={}){let i=this._composeStringFragments(e);if(t==null)return i;if(typeof t=="string")throw new TypeError("string render targets require filesystem support, which is unavailable in the portable renderer; pass a callable or writable target instead");if(typeof t.full=="function"&&typeof t.write!="function")return t.full(i),null;if(typeof t.write=="function")return t.write(i),null;if(typeof t=="function")return t(i),null;throw new TypeError("render target must be writable (.write), callable, or expose .full")}_composeStringFragments(e){if(!Array.isArray(e))return e;if(e.some(t=>typeof t!="string"))throw new TypeError("String composition requires string fragments; object renderers must define their own composition");return e.join("")}_escapeText(e){return String(e).replaceAll("&","&").replaceAll("<","<").replaceAll(">",">")}_escapeAttr(e){return this._escapeText(e).replaceAll('"',""")}_nodeDepth(e,t=0){let i=((e.fullpath||"").match(/\./g)||[]).length;return Math.max(i-1,0)+t}};var Tt=class extends Dt{static mode="xml";renderedItem(e,t,n,{tag:i,pretty:a=!1,depthOffset:s=0}={}){let o=this._formatAttrs(n),l=a?" ".repeat(this._nodeDepth(e,s)):"",u=a?`
|
|
23
|
+
`:"";if(Array.isArray(t)){let c=this._composeStringFragments(t);return`${l}<${i}${o}>${u}${c}${l}</${i}>${u}`}return t==null?`${l}<${i}${o}></${i}>${u}`:`${l}<${i}${o}>${this._escapeText(t)}</${i}>${u}`}finalize(e,t=null,{docHeader:n=null}={}){let i=this._composeStringFragments(e);return n===!0?i=`<?xml version='1.0' encoding='UTF-8'?>${i}`:typeof n=="string"&&(i=n+i),super.finalize(i,t)}_formatAttrs(e){return Object.entries(e||{}).map(([t,n])=>` ${t.startsWith("xmlns_")?`xmlns:${t.slice(6)}`:t}="${this._escapeAttr(n)}"`).join("")}};var Vo={document_format:{name:"builder_grammar",version:"1.1"},grammar:{name:"base",version:null,title:null,description:null},abstracts:{},elements:{dataSetter:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"destination",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"type",module:"builtins",name:"str"},has_default:!1},{name:"value",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"any"},has_default:!1},{name:"attr",kind:"var_keyword",role:"attribute",annotation:{kind:"any"},has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{data_element:!0}},dataFormula:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"destination",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"type",module:"builtins",name:"str"},has_default:!1},{name:"func",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"union",items:[{kind:"type",module:"builtins",name:"str"},{kind:"type",module:"collections.abc",name:"Callable"}]},has_default:!1},{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{data_element:!0}},dataController:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"func",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"union",items:[{kind:"type",module:"builtins",name:"str"},{kind:"type",module:"collections.abc",name:"Callable"}]},has_default:!1},{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{data_element:!0}}}};function Ho(r){let e=[];for(;r&&r!==Function.prototype;)e.push(r),r=Object.getPrototypeOf(r);return e.reverse()}function $f(r){let e=Object.create(null),t=(n,i)=>{let a=n.toLowerCase(),s=e[a];if(s!==void 0&&s!==i)throw new Error(`container '${n}' is already tied to implementation method '${s}' (cannot rebind to '${i}')`);e[a]=i};for(let n of Ho(r))if(Object.hasOwn(n,"containers"))for(let i of n.containers||[])t(i,i);return e}function $r(r){let e=Object.create(null);for(let t of Object.keys(r)){let n=t.toLowerCase();if(Object.hasOwn(e,n))throw new Error(`element declaration '${t}' has a case-insensitive collision with '${e[n]}'`);e[n]=t}return e}var Fr="_root_",la="_root_",Wo=new Set(["destination","func","value","_on_start"]),qe=class r{static _sourceClass=J;static registerBuilder(e){if(typeof e!="function"||!(e.prototype instanceof r))throw new TypeError("registerBuilder requires a BuilderBase subclass");let t=e._name;if(typeof t!="string"||!t)throw new TypeError("registered builders require a non-empty static _name");let n=r._registry.get(t);if(n&&n!==e)throw new Error(`Builder name '${t}' is already registered to ${n.name}; cannot register ${e.name}`);return r._registry.set(t,e),e}static getBuilderClass(e){let t=r._registry.get(e);if(!t)throw new Error(`No builder registered with name '${e}'`);return t}constructor(e=null){this.name=e||this.constructor._name,this._dataroot=new le,this._dataroot.setBackref(),this._dataroot.setItem(la,new le),this.data=this._dataroot.getItem(la),this._defaultTargets=new Map,this.materialized=Object.create(null),this._collection=null,this._schemaOverride=null,this._tagNamesOverride=null,this._componentMap=null,this._targetSerial=0,this._subbuilders=new Map,this._sourceHandles=new WeakMap;let t=this.constructor._sourceClass;this._sourceroot=new t(null,this),this._sourceroot.setBackref(),this._sourceroot.setItem(Fr,new t(null,this)),this.source=this._sourceroot.getItem(Fr)}wrapSource(e){if(e=Pr(e),!(e instanceof J)&&!(e instanceof er))throw new TypeError("wrapSource requires a SourceBag or SourceBagNode");let t=this._sourceHandles.get(e);return t||(t=Bo(this,e),this._sourceHandles.set(e,t)),t}get root(){return this.wrapSource(this.source)}getSubbuilder(e){if(typeof e!="string"||!e||e.includes(":"))throw new Error(`unsupported subbuilder reference '${e}'`);let t=this._subbuilders.get(e);if(!t){let n=r.getBuilderClass(e);t=new n,this._subbuilders.set(e,t)}return t._dataroot=this._dataroot,t.data=this.data,t}_resolveSubbuilderReference(e,t,n){if(typeof e!="string"||!e)throw new Error(`'${n}': subbuilder declaration must be a non-empty string`);if(e.includes(":"))throw new Error(`'${n}': runtime subbuilder reference '${e}' is unsupported`);return this.getSubbuilder(e)}static defineGrammar(e){let t=this._classCollection,n=t?new Ze(t.toDocument()).update(e):new Ze(e),i=aa(n.toDocument()),a=ia(i),s=$r(a.elements);this._classCollection=n,this._classSchema=a.elements,this._abstracts=a.abstracts,this._tagNames=s}static{this.defineGrammar(Vo)}get _containers(){return $f(this.constructor)}containerMethod(e){return this._containers[e.toLowerCase()]||null}componentMethod(e){return this._componentMap?.[e.toLowerCase()]||null}get schema(){return this._schemaOverride||this.constructor._classSchema||{}}get schemaTagNames(){return this._schemaOverride?this._tagNamesOverride??=$r(this.schema):this.constructor._tagNames??=$r(this.schema)}schemaTag(e){let t=e.toLowerCase(),n=this.schemaTagNames[t];if(n)return n;let i=`${this.constructor._name}_`;return t.startsWith(i)&&this.schemaTagNames[t.slice(i.length)]||null}loadGrammar(e,{replace:t=!1}={}){let n=this._collection||this.constructor._classCollection,i=t?new Ze(e):new Ze(n.toDocument()).update(e),a=aa(i.toDocument()),s=ia(a),o=$r(s.elements);return this._collection=i,this._schemaOverride=s.elements,this._tagNamesOverride=o,this}validateCustomTypes(e){let t=e.parentBag?.parentNode?.builder||e.parentBag?._builder,n=t&&t!==this&&t.schema[e.nodeTag]?._meta?.subbuilder?t:this;jo(e.nodeTag,n.schema[e.nodeTag],e.value,e.getAttr()||{})}validateNodeValues(e,t,n={}){let i=this.schemaTag(e);if(!i)throw new Error(`unknown element '${e}'`);return qo(i,this.schema[i],t,n),!0}validateNode(e,{value:t,attrs:n,childTags:i}={}){if(!e||typeof e.nodeTag!="string")throw new TypeError("validateNode requires a source node");let a=t!==void 0?t:e.value instanceof J?null:e.value;this.validateNodeValues(e.nodeTag,a,n||e.getAttr?.()||{});let s=this.schema[this.schemaTag(e.nodeTag)],o=i||(e.value instanceof J?e.value.getNodes().map(l=>l.nodeTag):null);return o&&this._validateChildren(e.nodeTag,s,o,!1),!0}validateChildren(e,t,{includeMinimum:n=!1}={}){let i=this.schemaTag(e);if(!i)throw new Error(`unknown element '${e}'`);if(!Array.isArray(t)||t.some(a=>typeof a!="string"))throw new TypeError("childTags must be an array of strings");return this._validateChildren(i,this.schema[i],t,n)}validateParent(e,t=null){let n=this.schemaTag(e);if(!n)throw new Error(`unknown element '${e}'`);let i=this.schema[n];if(!this._countsForGrammar(i))return!0;let a=i._parentSpec;if(a==null||a.has("*"))return!0;if(t===null)throw new Error(`'${n}' requires a declared parent`);let s=this.schemaTag(t);if(!s)throw new Error(`unknown parent element '${t}'`);return this._validateParent(n,i,s),!0}bagCall(e,t,n,i){return this.setChild(e,t,n,i)}commandOnNode(e,t,n,i){if(e=Pr(e),e.value instanceof J)return this.setChild(e.value,t,n,i);let a=e.value,s=new e.parentBag.constructor(null,e.builder||this),o=this.setChild(s,t,n,i,e);return this.promoteNodeValue(e,a,s),o}promoteNodeValue(e,t,n){e.setValue(n)}setChild(e,t,n,i,a=null){let s={...i},o=this.schema[t];if(!o)throw new Error(`unknown element '${t}'`);this.validateNodeValues(t,n,s);let l=o._meta?.subbuilder,c=(l==null?null:this._resolveSubbuilderReference(l,s,t))||this,d=n instanceof J?n._builderBindingPlan(c):null,f=a?.rootBuilder||e.root._builder||this;if(s.nodeId!=null&&f.source.getNodeByAttr("nodeId",s.nodeId))throw new Error(`Duplicate nodeId '${s.nodeId}'`);n instanceof J&&this._validateChildren(t,o,n.getNodes().map(v=>v.nodeTag),!1);let p=a||e.parentNode,h=p?.nodeTag?this.schema[p.nodeTag]:null;if(h&&!p._getMeta("subbuilder")&&this._countsForGrammar(o))this._validateParent(t,o,p.nodeTag),this._validateChildren(p.nodeTag,h,[...e.getNodes().map(v=>v.nodeTag),t],!1);else if(!h&&!p?._getMeta("subbuilder")&&o._parentSpec!=null&&this._countsForGrammar(o))throw new Error(`'${t}' requires a declared parent`);o._meta&&!("_meta"in s)&&(s._meta=o._meta),o.ns&&!("ns"in s)&&(s.ns=o.ns);let m=s.node_position;delete s.node_position;let g=s.node_label;delete s.node_label;let b;if(h?.collection_key){if(g!=null)throw new Error(`'${t}': node_label is not allowed in a collection`);b=this._collectionLabel(h.collection_key,t,s)}else{let v=h?._subSpec?.get(t);if(v&&v.max===1){if(g!=null)throw new Error(`'${t}': node_label is not allowed on a singleton`);b=t}else b=g||o.node_label||this._autoLabel(e,t)}if(e.node(b)!=null)throw new Error(`duplicate node label '${b}'`);return e._setBuilderItem(c,d,b,n,s,m||">",!1,!0,null,!1,!0,null,t)}_countsForGrammar(e){let t=e?._meta||{};return!(t.data_element||t.subbuilder||t.component)}_validateParent(e,t,n){let i=t._parentSpec;if(!(i==null||i.has("*")||!this._countsForGrammar(t))&&!i.has(n))throw new Error(`'${e}' not allowed as child of '${n}'`)}_validateChildren(e,t,n,i){let a=t._subSpec;if(a==null||a.has("*")||t._meta?.subbuilder)return[];let s=new Map;for(let o of n){let l=this.schema[o];if(l&&!this._countsForGrammar(l))continue;let u=a.get(o);if(!u)throw new Error(`'${o}' not allowed as child of '${e}'`);let c=(s.get(o)||0)+1;if(s.set(o,c),c>u.max)throw new Error(`too many '${o}' in '${e}'`)}return i?[...a].filter(([o,l])=>(s.get(o)||0)<l.min).map(([o])=>o):[]}_collectionLabel(e,t,n){let i=a=>{if(n[a]===null||n[a]===void 0)throw new Error(`'${t}': collection key needs attribute '${a}'`);return String(n[a])};return e.includes("${")?e.replace(/\$\{([^}]+)\}/g,(a,s)=>i(s)):i(e)}validateSource(){let e=[],t=(n,i="")=>{for(let a of n.getNodes()){let s=i?`${i}.${a.label}`:a.label,o=a.builder;o.validateCustomTypes(a);let l=o.schema[a.nodeTag];if(l&&!a._getMeta("data_element,subbuilder,component").some(Boolean)){let u=a.value instanceof J?a.value.getNodes().map(d=>d.nodeTag):[],c=o._validateChildren(a.nodeTag,l,u,!0);c.length&&e.push([s,c])}a.value instanceof J&&t(a.value,s)}};return t(this.source),e}_autoLabel(e,t){let n=0;for(;e.node(`${t}_${n}`)!==null&&e.node(`${t}_${n}`)!==void 0;)n+=1;return`${t}_${n}`}nodeById(e){let t=this.source.getNodeByAttr("nodeId",e);if(t==null)throw new Error(`nodeId not found: ${e}`);return t.builder.wrapSource(t)}runtimeValues(e){e.builder.validateCustomTypes(e);let t=new Map,n={},i=e.runtimeToEvaluate(),a=new Set(i.keys()),s=new Map([...Object.entries(e.getAttr()),...e.fixedAttrItems()]);for(let[c,d]of[...i])if(!(typeof c!="string"||!Qe(d)))for(let f of ri(e,d))i.has(f)||i.set(f,s.get(f));let o=e._getMeta("data_element");for(let[c,d]of i){if(d instanceof se){t.set(c,d.resolve());continue}let f=typeof c=="string"?Qe(d)?.pointer??d:d;if(!e.pointerType(f)){t.set(c,typeof c=="string"&&typeof d=="string"&&d.startsWith("==")?null:d);continue}let p=e.absDatapath(f);if(t.set(c,this.data.getItem(p)),!o&&!p.includes("?")&&c===tr){let h=this.data.getNode(p);h&&Object.assign(n,h.getAttr("_wdg"))}}let l=va(i,t,(c,d,f,p)=>this.evaluatePointerExpression(e,c,d,f,p)),u=l.get(tr);l.delete(tr);for(let c of l.keys())a.has(c)||l.delete(c);return[u,{...Object.fromEntries(l),...n}]}evaluatePointerExpression(e,t,n,i,a){return null}targetId(e){if(e._targetId)return e._targetId;let t=e.rootBuilder;return e.parentBag.root!==t.source.root?null:(t._targetSerial+=1,e._targetId=`n${t._targetSerial}`,e._targetId)}get dataLogic(){if(!this._dataLogic){let e=this._buildDataLogic();this._dataLogic=Array.isArray(e)?e:[e]}return this._dataLogic}_buildDataLogic(){return this}_resolveLogicFunc(e){if(typeof e=="function")return e;if(typeof e!="string")throw new Error("data-element func must be a name or a function");for(let t of this.dataLogic){let i=(typeof t=="function"?t:t.constructor)[e];if(typeof i=="function")return i}throw new Error(`data-element func '${e}' not found on any data_logic source`)}_bindings(e){let[,t]=this.runtimeValues(e),n={};for(let[i,a]of Object.entries(t))Wo.has(i)||(n[i]=a);return n}computeLogic(e){for(let t of e)this._computeNode(t)}_computeNode(e){let t=e.getAttr()||{};if(e.nodeTag==="dataSetter"){let n={};for(let[i,a]of Object.entries(t))i!=="destination"&&i!=="value"&&!i.startsWith("_")&&(n[i]=a);e.setRelativeData(t.destination,t.value,{attributes:Object.keys(n).length?n:null})}else if(e.nodeTag==="dataFormula"){let n=this._resolveLogicFunc(t.func);e.setRelativeData(t.destination,n(this._bindings(e)))}else e.nodeTag==="dataController"&&this._resolveLogicFunc(t.func)(e,this._bindings(e))}_dataElementNodes(){let e=[],t=n=>{for(let i of n.getNodes())i._getMeta("data_element")&&e.push(i),i.value instanceof J&&t(i.value)};return t(this.source),e}setup(e){}main(e){throw new Error(`${this.constructor.name}.main() not implemented: a bare builder is grammar, not a renderable page`)}_resolveComponents(){let e={};for(let o of Ho(this.constructor))if(Object.hasOwn(o,"components"))for(let l of o.components||[])e[l]=l;if(!Object.keys(e).length)return;let t={...this.schema},n={};for(let[o,l]of Object.entries(e))t[o]={sub_tags:"",_meta:{component:!0}},n[o.toLowerCase()]=l;let i=$r(t),a=this._collection||this.constructor._classCollection,s=a.toDocument();s.abstracts={},s.elements=Object.fromEntries(Object.keys(e).map(o=>[o,t[o]])),this._collection=new Ze(a.toDocument()).update(s),this._schemaOverride=t,this._componentMap=n,this._tagNamesOverride=i}_expansionRoot(e=null){let t=this.constructor._sourceClass,n=new t(null,this);return n.setBackref(),n.setItem(Fr,new t(null,this),e?{datapath:e}:null),n.getItem(Fr)}create(){this.setup(this.data),this._resolveComponents(),this.main(this.root),this.computeLogic(this._dataElementNodes())}get renderer_xml(){return new Tt(this)}getRenderer(e=null){e??=this.constructor._defaultRenderMode;let t=this[`renderer_${e}`];if(!t)throw new Error(`${this.constructor.name} does not expose renderer_${e}`);return t}materialize(e=null,t={}){e??=this.constructor._defaultRenderMode;let n=this.getRenderer(e),i=n.renderChildren(n.preprocess(this.source),t);return this.materialized[e]=i,i}setRenderTarget(e,t=null){t??=this.constructor._defaultRenderMode,this._defaultTargets.set(t,e)}render({mode:e=null,target:t=null,...n}={}){e??=this.constructor._defaultRenderMode;let i=this.getRenderer(e);if(t===!1&&i.renderType!=="string")throw new TypeError("target=false is not valid for an object renderer");let a=t===!1?null:t||this._defaultTargets.get(i.mode)||null,s={...a?.renderOpts,...n};return i.finalize(this.materialize(e,s),a,s)}};qe._registry=new Map;var Ff=new Set(["short","medium","long","full"]),Uf=/('(?:[^']|'')*'|[a-zA-Z]+|[^a-zA-Z']+)/g;function qf(r,e){if(!(r instanceof Date))throw new TypeError("Temporal formats require a typed Date value");if(!Number.isFinite(r.getTime()))throw new RangeError("Invalid date");let t=e||Ee(r).split("::").at(-1);if(!["D","H","DH","DHZ"].includes(t))throw new RangeError(`Unsupported temporal dtype: ${t}`);return t}function jf(r,e,t,n){let i=e.match(Uf)||[];if(i.join("")!==e)throw new RangeError("Unclosed format literal");let a=(c,d=2)=>String(c).padStart(d,"0"),s=c=>new Intl.DateTimeFormat(t,{timeZone:"UTC",...c}).format(r),u={...n==="H"?{}:{y:()=>String(r.getUTCFullYear()),yy:()=>a(r.getUTCFullYear()%100),yyyy:()=>a(r.getUTCFullYear(),4),M:()=>String(r.getUTCMonth()+1),MM:()=>a(r.getUTCMonth()+1),MMM:()=>s({month:"short"}),MMMM:()=>s({month:"long"}),d:()=>String(r.getUTCDate()),dd:()=>a(r.getUTCDate()),EEE:()=>s({weekday:"short"}),EEEE:()=>s({weekday:"long"})},...n==="D"?{}:{H:()=>String(r.getUTCHours()),HH:()=>a(r.getUTCHours()),h:()=>String(r.getUTCHours()%12||12),hh:()=>a(r.getUTCHours()%12||12),m:()=>String(r.getUTCMinutes()),mm:()=>a(r.getUTCMinutes()),s:()=>String(r.getUTCSeconds()),ss:()=>a(r.getUTCSeconds()),a:()=>new Intl.DateTimeFormat(t,{hour:"numeric",hour12:!0,timeZone:"UTC"}).formatToParts(r).find(c=>c.type==="dayPeriod").value}};return i.map(c=>{if(c.startsWith("'"))return c==="''"?"'":c.slice(1,-1).replaceAll("''","'");if(!/^[a-zA-Z]/.test(c))return c;if(!u[c])throw new RangeError(`Unsupported date format token: ${c}`);return u[c]()}).join("")}function Go(r,{format:e,mask:t,locale:n,dtype:i,places:a}={}){let s=r==null?"":String(r);if(r!=null&&r!==""&&(e!=null&&e!==""||a!=null))if(typeof r=="number"||Te(r))s=Vf(r,{format:e,locale:n,places:a});else{let o=qf(r,i);if(Ff.has(e)){let l={timeZone:"UTC"};o!=="H"&&(l.dateStyle=e),o!=="D"&&(l.timeStyle=e),s=new Intl.DateTimeFormat(n||void 0,l).format(r)}else s=jf(r,String(e),n||void 0,o)}return t==null?s:String(t).replaceAll("%s",()=>s)}function zf({format:r="decimal",places:e}={}){let t={maximumFractionDigits:20};if(!r||r==="decimal")t.style="decimal";else if(r==="percent")t.style="percent";else if(r==="scientific")t.notation="scientific";else{let n=/^(0|#,##0)(?:\.(0*)(#*))?$/.exec(r);if(!n||r.includes(".")&&!n[2]&&!n[3])throw new RangeError(`Unsupported number format: ${r}`);t.useGrouping=n[1].includes(","),t.minimumFractionDigits=(n[2]||"").length,t.maximumFractionDigits=(n[2]||"").length+(n[3]||"").length}if(e!=null&&e!==""){let n=Number(e);if(!Number.isInteger(n)||n<0||n>20)throw new RangeError("places must be an integer from 0 to 20");t.minimumFractionDigits=n,t.maximumFractionDigits=n}return t}function Vf(r,e={}){if(typeof r!="number"&&!Te(r))throw new TypeError("Number formatting requires a Number or Decimal");if(!Number.isFinite(Number(r)))throw new RangeError("Number must be finite");let t=new Intl.NumberFormat(e.locale||void 0,zf(e));if(Te(r)&&new Intl.NumberFormat("en",{useGrouping:!1}).format("9007199254740993")!=="9007199254740993")throw new Error("This browser cannot format Decimal values without precision loss");return t.format(Te(r)?r.toString():r)}var Hf=new Set(["style","script"]),Wf=new Set(["allowfullscreen","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","inert","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"]),Xo=new Set(["width","height","top","left","right","bottom","padding","margin","border","position","display","overflow","float","clear","resize","z_index","min_width","min_height","max_width","max_height","color","background","font","text","line_height","white_space","vertical_align","flex","gap","row_gap","column_gap","grid","align_content","justify_content","align_items","justify_items","visibility","opacity","cursor"]),Ur=new Set(["rounded","gradient","shadow","transform","transition","zoom","filter"]),Yo=r=>r===!0?"true":r===!1?"false":String(r),Fn=r=>typeof r=="number"&&Number.isFinite(r)?`${r}px`:String(r);function Gf(r){if(Xo.has(r))return!0;for(let e of Xo)if(r.startsWith(`${e}_`))return!0;return!1}function Xf(r){let e=new Map;if(!r)return e;let t=[],n=0,i=null,a=!1,s=!1,o=0,l=String(r);for(let u=0;u<l.length;u+=1){let c=l[u],d=l[u+1];if(s){c==="*"&&d==="/"&&(s=!1,u+=1);continue}if(a){a=!1;continue}if(c==="\\"){a=!0;continue}if(i){c===i&&(i=null);continue}c==='"'||c==="'"?i=c:c==="/"&&d==="*"?(s=!0,u+=1):"([{".includes(c)?o+=1:")]}".includes(c)&&o>0?o-=1:c===";"&&o===0&&(t.push(l.slice(n,u)),n=u+1)}t.push(l.slice(n));for(let u of t){let c=u.trim();if(!c)continue;let d=c.indexOf(":");if(d<0)throw new TypeError(`malformed style declaration '${c}'`);e.set(c.slice(0,d).trim(),c.slice(d+1).trim())}return e}var qr=class extends Dt{static mode="html";renderedItem(e,t,n,{tag:i,xml:a=!0,pretty:s=!1,depthOffset:o=0,includeDatapath:l=!1}={}){e.parentNode?._getMeta("subbuilder")==="html"&&(n={xmlns:"http://www.w3.org/1999/xhtml",...n});let{format:c,mask:d,locale:f,places:p,dtype:h,...m}=n;!Array.isArray(t)&&(c!=null||d!=null||p!=null)&&(t=Go(t,{format:c,mask:d,places:p,dtype:h,locale:this._displayLocale(e,f)}));let g=this._formatAttrs(m);if(l){if(!Object.hasOwn(n,"id")){let w=this.builder.targetId(e);w!==null&&(g+=` id="${this._htmlAttrValue(w)}"`)}for(let[w,D]of Object.entries(e.getAttr()))e.pointerType(D)&&(g+=` data-${this.adapt(w)}-pointer="${this._htmlAttrValue(e.absDatapath(D))}"`)}let b=s?" ".repeat(this._nodeDepth(e,o)):"",y=s?`
|
|
24
|
+
`:"";if(e._getMeta("void"))return`${b}<${i}${g}${a?"/":""}>${y}`;if(Array.isArray(t)){let w=this._composeStringFragments(t);return`${b}<${i}${g}>${y}${w}${b}</${i}>${y}`}if(t==null)return`${b}<${i}${g}></${i}>${y}`;let v=typeof t=="string"&&t.endsWith("::HTML")?t.slice(0,-6):Hf.has(i)?String(t):this._escapeText(t);return`${b}<${i}${g}>${v}</${i}>${y}`}_displayLocale(e,t){if(t)return t;for(let n=e.parentNode;n;n=n.parentNode){let i=n.getAttr("locale");if(i==null)continue;let a=n.pointerType(i)?n.data.getItem(n.absDatapath(i)):i;if(a)return a}}adaptAttrs(e){let t={},n={};for(let[a,s]of Object.entries(e||{}))if(a.startsWith(`${this.builder.constructor._name}_`))t[this.adapt(a)]=s;else if(a==="dtype")t.dtype=s;else{if(this.builder.constructor.retainedAttrPrefixes.some(o=>a.startsWith(o)))continue;this._isStyleContribution(a)?n[a]=s:t[a]=s}let i=this._adaptStyle(n);return i&&(t.style=i),t}_isStyleContribution(e){if(e==="style"||e.startsWith("style_")||Ur.has(e))return!0;let t=e.includes("_")?e.slice(0,e.indexOf("_")):null;return t!==null&&Ur.has(t)||Gf(e)}_adaptStyle(e){let t=Xf(e.style),n=new Map,i=new Map;for(let[a,s]of Object.entries(e))if(a!=="style")if(a.startsWith("style_"))t.set(a.slice(6).replaceAll("_","-"),Yo(s));else if(Ur.has(a))n.set(a,s);else{let o=a.indexOf("_"),l=o<0?a:a.slice(0,o);o>=0&&Ur.has(l)?(i.has(l)||i.set(l,{}),i.get(l)[a.slice(o+1)]=s):t.set(a.replaceAll("_","-"),Yo(s))}for(let a of Ur)(n.has(a)||i.has(a))&&this[`_macro_${a}`](n.get(a),i.get(a)||{},t);return[...t].map(([a,s])=>`${a}: ${s}`).join("; ")}_formatAttrs(e){let t=[];for(let[n,i]of Object.entries(e||{}))Wf.has(n)?i&&t.push(` ${n}`):t.push(` ${n}="${this._htmlAttrValue(i)}"`);return t.join("")}_htmlAttrValue(e){return(e===!0?"true":e===!1?"false":String(e)).replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""")}_macro_rounded(e,t,n){let i=e===void 0?{}:{top_left:e,top_right:e,bottom_left:e,bottom_right:e};for(let[a,s]of Object.entries(t))if(a==="top"||a==="bottom")i[`${a}_left`]=s,i[`${a}_right`]=s;else if(a==="left"||a==="right")i[`top_${a}`]=s,i[`bottom_${a}`]=s;else if(["top_left","top_right","bottom_left","bottom_right"].includes(a))i[a]=s;else throw new TypeError(`rounded: unknown sub-kwarg '${a}'`);for(let[a,s]of Object.entries(i))n.set(`border-${a.replaceAll("_","-")}-radius`,Fn(s))}_macro_transform(e,t,n){let i=e===void 0?[]:[String(e)];for(let[a,s]of Object.entries(t))a==="rotate"?i.push(`rotate(${s}deg)`):a==="scale"||a==="translate"?i.push(`${a}(${s})`):a==="translate_x"?i.push(`translateX(${Fn(s)})`):a==="translate_y"?i.push(`translateY(${Fn(s)})`):a==="skew_x"?i.push(`skewX(${s}deg)`):a==="skew_y"?i.push(`skewY(${s}deg)`):i.push(`${a.replaceAll("_","-")}(${s})`);i.length&&n.set("transform",i.join(" "))}_macro_filter(e,t,n){let i=e===void 0?[]:[String(e)];for(let[a,s]of Object.entries(t))a==="rotate"?i.push(`hue-rotate(${s}deg)`):a==="blur"?i.push(`blur(${Fn(s)})`):a==="drop_shadow"?i.push(`drop-shadow(${s})`):i.push(`${a.replaceAll("_","-")}(${s})`);i.length&&n.set("filter",i.join(" "))}_macro_transition(e,t,n){e!==void 0&&n.set("transition",String(e));for(let[i,a]of Object.entries(t))n.set(`transition-${i.replaceAll("_","-")}`,String(a))}_macro_zoom(e,t,n){e!==void 0&&n.set("zoom",String(e))}_macro_shadow(e,t,n){e!==void 0&&n.set("box-shadow",String(e));for(let[i,a]of Object.entries(t))n.set(`box-shadow-${i.replaceAll("_","-")}`,String(a))}_macro_gradient(e,t,n){e!==void 0&&n.set("background-image",String(e))}};var Yf=new Set(["alignment_baseline","baseline_shift","clip_path","clip_rule","color_interpolation","color_interpolation_filters","dominant_baseline","fill_opacity","fill_rule","flood_color","flood_opacity","font_family","font_size","font_size_adjust","font_stretch","font_style","font_variant","font_weight","glyph_orientation_horizontal","glyph_orientation_vertical","image_rendering","letter_spacing","lighting_color","marker_end","marker_mid","marker_start","overline_position","overline_thickness","paint_order","pointer_events","shape_rendering","stop_color","stop_opacity","strikethrough_position","strikethrough_thickness","stroke_dasharray","stroke_dashoffset","stroke_linecap","stroke_linejoin","stroke_miterlimit","stroke_opacity","stroke_width","text_anchor","text_decoration","text_rendering","underline_position","underline_thickness","unicode_bidi","word_spacing","writing_mode"]);function Zo(r){return Object.fromEntries(Object.entries(r||{}).map(([e,t])=>[Yf.has(e)?e.replaceAll("_","-"):e,t]))}var jr=class extends Tt{static mode="svg";adaptAttrs(e){return Zo(e)}};var Jo={document_format:{name:"builder_grammar",version:"1.1"},grammar:{name:"html",version:null,title:null,description:null},abstracts:{},elements:{svg:{doc:"Switch to the SVG dialect from this node down (BLD.2).\n\n A sub-builder element: ``_meta['subbuilder']`` switches the active\n dialect to SVG from this node down. No ``render_tag``: ``<svg>`` is\n emitted verbatim (HTML5 has a native ``<svg>`` tag).",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{subbuilder:"svg"}},a:{doc:null,sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},abbr:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},address:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},area:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},article:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},aside:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},audio:{doc:null,sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},b:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},base:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},bdi:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},bdo:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},blockquote:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},body:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},br:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},button:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},canvas:{doc:null,sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},caption:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},cite:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},code:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},col:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},colgroup:{doc:null,sub_tags:"col,script,template",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},data:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},datalist:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,option,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},dd:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},del_:{doc:null,sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},details:{doc:null,sub_tags:"summary[0:1],a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},dfn:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},dialog:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},div:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},dl:{doc:null,sub_tags:"dd,div,dt,script,template",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},dt:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},em:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},embed:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},fieldset:{doc:null,sub_tags:"legend[0:1],a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},figcaption:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},figure:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figcaption[0:1],figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},footer:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},form:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},h1:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},h2:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},h3:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},h4:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},h5:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},h6:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},head:{doc:null,sub_tags:"base[0:1],link,meta,noscript,script,style,template,title[0:1]",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},header:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},hgroup:{doc:null,sub_tags:"h1,h2,h3,h4,h5,h6,p,script,template",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},hr:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},html:{doc:null,sub_tags:"head[0:1],body[0:1]",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},i:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},iframe:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},img:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},input:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},ins:{doc:null,sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},kbd:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},label:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},legend:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,h1,h2,h3,h4,h5,h6,hgroup,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},li:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},link:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},main:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},map:{doc:null,sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},mark:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},menu:{doc:null,sub_tags:"li,script,template",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},meta:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},meter:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},nav:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},noscript:{doc:null,sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},object:{doc:null,sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},ol:{doc:null,sub_tags:"li,script,template",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},optgroup:{doc:null,sub_tags:"div,legend,noscript,option,script,template",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},option:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,div,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},output:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},p:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},picture:{doc:null,sub_tags:"img[0:1],script,source,template",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},pre:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},progress:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},q:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},rp:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},rt:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},ruby:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},s:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},samp:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},script:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},search:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},section:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},select:{doc:null,sub_tags:"button,div,hr,noscript,optgroup,option,script,template",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},slot:{doc:null,sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},small:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},source:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},span:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},strong:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},style:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},sub:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},summary:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,h1,h2,h3,h4,h5,h6,hgroup,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},sup:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},table:{doc:null,sub_tags:"caption[0:1],colgroup,script,tbody,template,tfoot[0:1],thead[0:1],tr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},tbody:{doc:null,sub_tags:"script,template,tr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},td:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},template:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,caption,cite,code,col,colgroup,data,datalist,del_,details,dfn,dialog,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,legend,li,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,optgroup,option,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,source,span,strong,style,sub,summary,sup,table,tbody,td,template,textarea,tfoot,th,thead,time,tr,track,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},textarea:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},tfoot:{doc:null,sub_tags:"script,template,tr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},th:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},thead:{doc:null,sub_tags:"script,template,tr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},time:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},title:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},tr:{doc:null,sub_tags:"script,td,template,th",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},track:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},u:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},ul:{doc:null,sub_tags:"li,script,template",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},var:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},video:{doc:null,sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},wbr:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},selectedcontent:{doc:"Mirror of the selected option for Customizable Select (HTML 2024).",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},dataSetter:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"destination",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"type",module:"builtins",name:"str"},has_default:!1},{name:"value",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"any"},has_default:!1},{name:"attr",kind:"var_keyword",role:"attribute",annotation:{kind:"any"},has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{data_element:!0}},dataFormula:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"destination",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"type",module:"builtins",name:"str"},has_default:!1},{name:"func",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"union",items:[{kind:"type",module:"builtins",name:"str"},{kind:"type",module:"collections.abc",name:"Callable"}]},has_default:!1},{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{data_element:!0}},dataController:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"func",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"union",items:[{kind:"type",module:"builtins",name:"str"},{kind:"type",module:"collections.abc",name:"Callable"}]},has_default:!1},{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{data_element:!0}}}};var Un=class extends qe{static _name="html";static _defaultRenderMode="html";static retainedAttrPrefixes=["validate_","dtype"];static{this.defineGrammar(Jo)}get renderer_html(){return new qr(this)}};qe.registerBuilder(Un);var Ko={document_format:{name:"builder_grammar",version:"1.1"},grammar:{name:"svg",version:null,title:null,description:null},abstracts:{graphics:{doc:"SVG graphics content: any graphical element.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},_meta:null},containerElement:{doc:"SVG container content: elements that can hold children.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},_meta:null}},elements:{html:{doc:"Switch to the HTML dialect from this node down (BLD.2).\n\n A sub-builder element: ``_meta['subbuilder']`` switches the active\n dialect to HTML from this node down. The source tag ``html`` is\n rendered as ``_meta['render_tag']`` (``<foreignObject>``) carrying\n ``_meta['render_attributes']`` (the SVG namespace). The immediate\n HTML child declares XHTML so both sides of the XML boundary retain\n their native namespace.\n ",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{subbuilder:"html",render_tag:"foreignObject",render_attributes:{xmlns:"http://www.w3.org/2000/svg"}}},svg:{doc:"Root SVG container or nested SVG viewport.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},g:{doc:"Group container for applying transforms and styles.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},defs:{doc:"Container for referenced elements (gradients, patterns, etc.).",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},symbol:{doc:"Reusable graphical template, rendered only when referenced by <use>.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},use:{doc:"Reference and render a <symbol> or other element.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},rect:{doc:"Rectangle.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},circle:{doc:"Circle.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},ellipse:{doc:"Ellipse.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},line:{doc:"Line segment between two points.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},polyline:{doc:"Open shape of connected line segments.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},polygon:{doc:"Closed shape of connected line segments.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},path:{doc:"Arbitrary shape defined by path commands (d attribute).",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},image:{doc:"Embedded raster image.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},text:{doc:"Text block. Contains text content and optional <tspan>/<textPath>.",sub_tags:"tspan,textPath",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},tspan:{doc:"Inline text span within <text>.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},textPath:{doc:"Text rendered along a path shape.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},linearGradient:{doc:"Linear gradient definition. Place inside <defs>.",sub_tags:"stop",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},radialGradient:{doc:"Radial gradient definition. Place inside <defs>.",sub_tags:"stop",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},stop:{doc:"Gradient stop (color and offset).",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},pattern:{doc:"Tile pattern definition. Place inside <defs>.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},clipPath:{doc:"Clipping path definition.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},mask:{doc:"Alpha mask definition.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},marker:{doc:"Marker symbol for line endpoints or vertices.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},filter:{doc:"Filter effect container. Place inside <defs>.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feGaussianBlur:{doc:"Gaussian blur filter primitive.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feOffset:{doc:"Offset filter primitive.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feBlend:{doc:"Blend filter primitive.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feColorMatrix:{doc:"Color matrix filter primitive.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feComposite:{doc:"Composite filter primitive.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feFlood:{doc:"Flood fill filter primitive.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feMerge:{doc:"Merge filter primitive (container for feMergeNode).",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feMergeNode:{doc:"Single input for feMerge.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feDropShadow:{doc:"Drop shadow filter primitive (SVG 2).",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feDiffuseLighting:{doc:"Diffuse lighting filter primitive.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feSpecularLighting:{doc:"Specular lighting filter primitive.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},fePointLight:{doc:"Point light source for lighting filters.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feDistantLight:{doc:"Distant light source for lighting filters.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feSpotLight:{doc:"Spot light source for lighting filters.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feMorphology:{doc:"Morphology filter primitive (erode/dilate).",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feTurbulence:{doc:"Turbulence noise filter primitive.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feDisplacementMap:{doc:"Displacement map filter primitive.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feConvolveMatrix:{doc:"Convolution matrix filter primitive.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feImage:{doc:"Image filter primitive.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feTile:{doc:"Tile filter primitive.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},animate:{doc:"Animate an attribute over time.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},animateTransform:{doc:"Animate a transform attribute.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},animateMotion:{doc:"Animate motion along a path.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},set:{doc:"Set an attribute to a value for a duration.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},title:{doc:"Accessible title (tooltip in browsers).",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},desc:{doc:"Accessible description.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},metadata:{doc:"Metadata container (RDF, Dublin Core, etc.).",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},a:{doc:"Hyperlink wrapper.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},foreignObject:{doc:"Container for non-SVG content (HTML, MathML).",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},switch:{doc:"Conditional processing (renders first matching child).",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},dataSetter:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"destination",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"type",module:"builtins",name:"str"},has_default:!1},{name:"value",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"any"},has_default:!1},{name:"attr",kind:"var_keyword",role:"attribute",annotation:{kind:"any"},has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{data_element:!0}},dataFormula:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"destination",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"type",module:"builtins",name:"str"},has_default:!1},{name:"func",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"union",items:[{kind:"type",module:"builtins",name:"str"},{kind:"type",module:"collections.abc",name:"Callable"}]},has_default:!1},{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{data_element:!0}},dataController:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"func",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"union",items:[{kind:"type",module:"builtins",name:"str"},{kind:"type",module:"collections.abc",name:"Callable"}]},has_default:!1},{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{data_element:!0}}}};var qn=class extends qe{static _name="svg";static _defaultRenderMode="svg";static{this.defineGrammar(Ko)}get renderer_svg(){return new jr(this)}};qe.registerBuilder(qn);var oe="http://www.w3.org/2000/svg";var jn=new WeakMap,pt=class{#e;#n;#t=!1;#a=!1;#i=!1;#o=!1;#r=!1;#l=null;#s=0;#c=null;#f=null;#u=null;#d=()=>{this.#i&&!this.parameters.docked&&this.#_()};constructor(e,t,{modal:n,validateContent:i}){this.host=e,this.root=t,this.modal=n,this.validateContent=i;let a=this.ownerDocument,s=this.root;s.classList.add("window-surface");let o=a.createElement("style");o.textContent=`.window-surface{display:contents;font:inherit;color:var(--gramlot-ink,CanvasText)}
|
|
25
25
|
.window-surface *,.window-surface *::before,.window-surface *::after{box-sizing:border-box}
|
|
26
26
|
.window-surface dialog{position:fixed;inset:auto;margin:0;padding:0;border:1px solid var(--gramlot-border,#d5dce5);
|
|
27
27
|
border-radius:var(--gramlot-window-radius,10px);color:inherit;font:inherit;
|
|
28
28
|
background:var(--gramlot-surface,Canvas);box-shadow:0 2px 6px #00000014,0 16px 36px #00000029;overflow:hidden;
|
|
29
29
|
max-width:calc(100vw - 16px);max-height:calc(100dvh - 16px)}
|
|
30
30
|
.window-surface dialog[open]{display:flex;flex-direction:column}
|
|
31
|
+
.window-surface dialog[data-docked]{position:relative!important;inset:0!important;width:100%!important;height:100%!important;
|
|
32
|
+
min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;
|
|
33
|
+
border:0;border-radius:0;box-shadow:none;z-index:auto!important}
|
|
34
|
+
.window-surface dialog[data-docked] .titlebar,.window-surface dialog[data-docked] .resize{display:none!important}
|
|
31
35
|
.window-surface dialog[data-maximized]{max-width:100vw;max-height:100dvh;border-radius:0}
|
|
32
36
|
.window-surface dialog::backdrop{background:var(--gramlot-window-backdrop,#0006)}
|
|
33
37
|
.window-surface .titlebar{display:flex;align-items:center;gap:4px;flex:none;min-height:max(32px,var(--gramlot-tab-height,32px));padding:3px 5px 3px 12px;
|
|
@@ -48,7 +52,7 @@ ${" ".repeat(a)}</${s}>`:`<${s}${l}>${f}</${s}>`:t===null||t.includes(s)?`<${s}
|
|
|
48
52
|
.window-surface .resize svg{width:14px;height:14px;pointer-events:none}
|
|
49
53
|
.window-surface [hidden]{display:none!important}
|
|
50
54
|
.window-surface .status{flex:none;font-size:.85em;padding:4px 10px;color:var(--gramlot-error,#b22)}
|
|
51
|
-
.window-surface dialog[data-collapsed] .titlebar{border-bottom:0}`,this.shell=i.createElement("dialog"),this.titlebar=i.createElement("header"),this.titlebar.className="titlebar",this.heading=i.createElement("h2"),this.heading.id="",this.heading.className="title",this.collapseButton=this.#p("Collapse window","\u2212"),this.maximizeButton=this.#p("Maximize window","\u25A1"),this.closeButton=this.#p("Close window","\xD7"),this.titlebar.append(this.heading,this.collapseButton,this.maximizeButton,this.closeButton),this.body=i.createElement("div"),this.body.className="body",this.body.append(i.createElement("slot")),this.resizeButton=this.#p("Resize window",""),this.resizeButton.className="resize";let l=i.createElementNS(oe,"svg");l.setAttribute("viewBox","0 0 16 16"),l.setAttribute("aria-hidden","true"),l.setAttribute("focusable","false");let u=i.createElementNS(oe,"path");u.setAttribute("d","M5 13 13 5M9 13l4-4"),u.setAttribute("fill","none"),u.setAttribute("stroke","currentColor"),u.setAttribute("stroke-width","1.25"),u.setAttribute("stroke-linecap","round"),l.append(u),this.resizeButton.append(l),this.status=i.createElement("div"),this.status.className="status",this.status.hidden=!0,this.status.setAttribute("role","alert"),this.shell.append(this.titlebar,this.body,this.status,this.resizeButton),s.append(o,this.shell),this.closeButton.addEventListener("click",()=>this.requestClose("close")),this.collapseButton.addEventListener("click",()=>this.#k(!this.#o,!0)),this.maximizeButton.addEventListener("click",()=>this.#m(!this.#r,!0)),this.shell.addEventListener("cancel",c=>{c.preventDefault(),this.requestClose("escape")}),this.shell.addEventListener("keydown",c=>{!this.modal&&c.key==="Escape"&&!c.defaultPrevented&&(c.preventDefault(),this.requestClose("escape"))}),this.shell.addEventListener("focusin",()=>this.#b()),this.shell.addEventListener("pointerdown",()=>this.#b());for(let[c,d]of[[this.titlebar,"move"],[this.resizeButton,"resize"]])c.addEventListener("pointerdown",f=>this.#S(f,d)),c.addEventListener("pointermove",f=>this.#I(f)),c.addEventListener("pointerup",f=>this.#T(f,!0)),c.addEventListener("pointercancel",f=>this.#T(f,!1)),c.addEventListener("lostpointercapture",f=>this.#T(f,!1)),c.addEventListener("keydown",f=>this.#B(f,d));this.#n=new i.defaultView.MutationObserver(()=>this.#g())}#p(e,t){let n=this.ownerDocument.createElement("button");return n.type="button",n.textContent=t,n.setAttribute("aria-label",e),n.title=e,n}get ownerDocument(){return this.host.ownerDocument}get opened(){return this.#a}focus(){this.#b(),this.closeButton.focus()}setSourceContext(e){this.#e=e}connect(){this.#i=!0;let e=jn.get(this.ownerDocument);e||jn.set(this.ownerDocument,e=new Set),e.add(this),this.#n.observe(this.host,{childList:!0}),this.ownerDocument.defaultView.addEventListener("resize",this.#d),this.#g()}disconnect(){jn.get(this.ownerDocument).delete(this),this.#i=!1,this.#s++,this.#l=null,this.#n.disconnect(),this.ownerDocument.defaultView.removeEventListener("resize",this.#d),this.#x(),this.shell.open&&this.shell.close(),this.#a=!1,this.#E()}configure(e){let t=this.parameters;this.parameters=e,t&&(["width","height","left","top","minWidth","minHeight"].some(n=>t[n]!==this.parameters[n])&&(this.#x(),this.#c=null,this.#o=!1,this.#r=!1),t.open!==this.parameters.open&&(this.#s++,this.#l=null),(t.movable!==this.parameters.movable||t.resizable!==this.parameters.resizable)&&this.#x()),this.#g()}#g(){this.#t||(this.#t=!0,queueMicrotask(()=>{this.#t=!1,this.#i&&this.host.isConnected&&this.parameters&&this.#y()}))}#y(){this.validateContent();let e=this.parameters;if(this.heading.textContent=e.title,this.shell.setAttribute("aria-label",e.title),this.closeButton.hidden=!e.closable,this.closeButton.disabled=!!this.#l,this.collapseButton.hidden=!e.collapsible,this.maximizeButton.hidden=!e.maximizable,!e.open){this.#D(!1);return}this.#a?this.#c||(this.#h(),this.#_()):(this.#u=this.#A(),this.#o=!1,this.#r=!1,this.body.hidden=!1,this.shell.removeAttribute("data-collapsed"),this.modal?this.shell.showModal():this.shell.show(),this.#a=!0,this.#h(),this.#_(),this.#b(),this.#e.publish("opened",{})),this.#m(e.maximizable&&e.maximized,!1),this.#k(e.collapsible&&e.collapsed,!1),!e.maximizable&&e.maximized&&this.#e.writeParameter("maximized",!1),!e.collapsible&&e.collapsed&&this.#e.writeParameter("collapsed",!1)}#A(){let e=this.ownerDocument.activeElement;for(;e?.shadowRoot?.activeElement;)e=e.shadowRoot.activeElement;return e}#E(){let e=this.#u;this.#u=null,e?.isConnected&&e.focus({preventScroll:!0})}#h(){let e=this.parameters,t=this.shell.style;if(this.shell.removeAttribute("data-maximized"),t.width=e.width??"var(--gramlot-window-width,36rem)",t.height=e.height??"var(--gramlot-window-height,24rem)",t.minWidth=e.minWidth??"min(220px, calc(100vw - 16px))",t.minHeight=e.minHeight??"min(140px, calc(100dvh - 16px))",t.left=e.left??"0px",t.top=e.top??"0px",this.#c){this.#v(this.#c);return}if(!this.#c){let n=this.shell.getBoundingClientRect(),a=this.ownerDocument.defaultView;e.left==null&&(t.left=`${Math.max(8,(a.document.documentElement.clientWidth-n.width)/2)}px`),e.top==null&&(t.top=`${Math.max(8,(a.document.documentElement.clientHeight-n.height)/2)}px`)}}#_(){if(this.#r){this.#w();return}let e=this.shell.getBoundingClientRect(),t=this.ownerDocument.defaultView,n=Math.min(e.width,Math.max(0,t.document.documentElement.clientWidth-16)),a=Math.min(e.height,Math.max(0,t.document.documentElement.clientHeight-16)),i={left:Math.max(8,Math.min(e.left,t.document.documentElement.clientWidth-n-8)),top:Math.max(8,Math.min(e.top,t.document.documentElement.clientHeight-a-8)),width:n,height:a};this.#v(i),this.#o?this.#c={...this.#c,left:i.left,top:i.top,width:i.width}:this.#c=i}#v(e){for(let t of["left","top","width","height"])this.shell.style[t]=`${e[t]}px`}#b(){if(this.modal||!this.#a)return;let e=100,t=[...jn.get(this.ownerDocument)].filter(n=>n.opened&&!n.modal&&n!==this);t.sort((n,a)=>Number(n.shell.style.zIndex)-Number(a.shell.style.zIndex)).forEach((n,a)=>n.shell.style.zIndex=String(e+a)),this.shell.style.zIndex=String(e+t.length)}#w(){let e=this.ownerDocument.documentElement,t=this.#r?{left:0,top:0,width:e.clientWidth,height:e.clientHeight}:{...this.#c};this.#o&&(t.height=this.titlebar.getBoundingClientRect().height+2),this.shell.toggleAttribute("data-maximized",this.#r),this.shell.style.minWidth=this.#r?"0":this.parameters.minWidth??"min(220px, calc(100vw - 16px))",this.shell.style.minHeight=this.#o||this.#r?"0":this.parameters.minHeight??"min(140px, calc(100dvh - 16px))",this.#v(t);let n=this.parameters.movable&&!this.#r;this.titlebar.toggleAttribute("data-movable",n),this.titlebar.tabIndex=n?0:-1,this.titlebar.setAttribute("aria-label",n?"Move window: use arrow keys":this.parameters.title),this.resizeButton.hidden=this.#o||this.#r||!this.parameters.resizable}#m(e,t){this.#a&&(e!==this.#r&&(this.#x(),this.#r=e),this.#w(),e||this.#_(),this.maximizeButton.textContent=e?"\u2750":"\u25A1",this.maximizeButton.setAttribute("aria-label",e?"Restore size":"Maximize window"),this.maximizeButton.title=e?"Restore size":"Maximize window",this.maximizeButton.setAttribute("aria-pressed",String(e)),t&&(this.parameters.maximized=e,this.#e.writeParameter("maximized",e)))}#k(e,t){this.#a&&(e!==this.#o&&(this.#x(),e&&this.body.contains(this.#A())&&this.collapseButton.focus(),this.#o=e),this.body.hidden=e,this.shell.toggleAttribute("data-collapsed",e),this.collapseButton.textContent=e?"\uFF0B":"\u2212",this.collapseButton.setAttribute("aria-label",e?"Expand window":"Collapse window"),this.collapseButton.title=e?"Expand window":"Collapse window",this.collapseButton.setAttribute("aria-expanded",String(!e)),this.#w(),this.#_(),t&&(this.parameters.collapsed=e,this.#e.writeParameter("collapsed",e)))}async requestClose(e="application"){if(!this.#a||!this.parameters.closable&&e!=="application")return!1;if(this.#l)return this.#l;let t=this.#s;this.status.hidden=!0;let n=async()=>{try{let a=this.parameters.beforeClose?await this.#e.callLogic(this.parameters.beforeClose,{reason:e}):!0;if(typeof a!="boolean")throw new TypeError("beforeClose must return a boolean");return!this.#i||t!==this.#s||!this.#a?!1:(a&&this.#D(!0),a)}catch(a){return this.#i&&t===this.#s&&(this.status.textContent="Unable to close: "+a.message,this.status.hidden=!1,this.ownerDocument.defaultView.console.error(a)),!1}finally{t===this.#s&&(this.#l=null,this.closeButton.disabled=!1,this.shell.removeAttribute("aria-busy"))}};return this.closeButton.disabled=!0,this.shell.setAttribute("aria-busy","true"),this.#l=Promise.resolve().then(n),this.#l}#D(e){this.#a&&(this.#s++,this.#l=null,this.#x(),this.#a=!1,this.shell.open&&this.shell.close(),this.shell.removeAttribute("aria-busy"),this.closeButton.disabled=!1,this.#E(),e&&(this.parameters.open=!1,this.#e.writeParameter("open",!1)),this.#e.publish("closed",{}))}#S(e,t){if(e.button!==0||!this.#a||this.#r||t==="move"&&!this.parameters.movable||t==="resize"&&(!this.parameters.resizable||this.#o)||t==="move"&&e.target.closest("button"))return;e.preventDefault(),this.#x();let n=this.shell.getBoundingClientRect();this.#f={kind:t,id:e.pointerId,handle:e.currentTarget,x:e.clientX,y:e.clientY,rect:{left:n.left,top:n.top,width:n.width,height:n.height}},e.currentTarget.setPointerCapture(e.pointerId),e.currentTarget.focus()}#I(e){let t=this.#f;!t||t.id!==e.pointerId||this.#C(t.rect,e.clientX-t.x,e.clientY-t.y,t.kind)}#C(e,t,n,a){let i={...e},s=this.ownerDocument.defaultView;if(a==="move")i.left+=t,i.top+=n;else{let o=s.getComputedStyle(this.shell);i.width=Math.max(parseFloat(o.minWidth)||0,i.width+t),i.height=Math.max(parseFloat(o.minHeight)||0,i.height+n)}i.width=Math.min(i.width,Math.max(0,s.document.documentElement.clientWidth-16)),i.height=Math.min(i.height,Math.max(0,s.document.documentElement.clientHeight-16)),i.left=Math.max(8,Math.min(i.left,s.document.documentElement.clientWidth-i.width-8)),i.top=Math.max(8,Math.min(i.top,s.document.documentElement.clientHeight-i.height-8)),this.#v(i),this.#o?this.#c={...this.#c,left:i.left,top:i.top,width:i.width}:this.#c=i}#T(e,t){let n=this.#f;!n||n.id!==e.pointerId||(this.#f=null,n.handle.hasPointerCapture(n.id)&&n.handle.releasePointerCapture(n.id),t?this.#N(n.kind):(this.#v(n.rect),this.#o?this.#c={...this.#c,left:n.rect.left,top:n.rect.top,width:n.rect.width}:this.#c=n.rect))}#x(){this.#f&&this.#T({pointerId:this.#f.id},!1)}#N(e){let t=this.shell.getBoundingClientRect();for(let n of e==="move"?["left","top"]:["width","height"]){let a=`${t[n]}px`;this.#e.writeParameter(n,a)}}#B(e,t){if(e.target!==e.currentTarget||!["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(e.key)||this.#r||t==="move"&&!this.parameters.movable||t==="resize"&&(!this.parameters.resizable||this.#o))return;e.preventDefault(),e.stopPropagation();let n=this.shell.getBoundingClientRect(),a=e.shiftKey?1:10;this.#C({left:n.left,top:n.top,width:n.width,height:n.height},e.key==="ArrowLeft"?-a:e.key==="ArrowRight"?a:0,e.key==="ArrowUp"?-a:e.key==="ArrowDown"?a:0,t),this.#N(t)}};import{createDOMPurify as Zf}from"@gramlot/gramlot";var Jf=["top","bottom","left","right"],zn=[...Jf,"center"],Je=r=>r==="top"||r==="bottom";function Kf(r,e,{adapt:t,invoke:n,publish:a,publishParent:i,writeParameter:s}){let o={...e},l={},u={};for(let[M,V]of Object.entries(o))for(let[te,U]of[["splitter_",l],["drawer_",u]])M.startsWith(te)&&(U[M.slice(te.length)]=V,delete o[M]);let c=o.region,d=o.detachable??!1;if(typeof d!="boolean")throw new TypeError("detachable must be a boolean");if(!zn.includes(c))throw new TypeError(`Invalid border region: ${c}`);let f=o.minSize??0,p=o.maxSize??1/0;if(typeof f!="number"||typeof p!="number"||!Number.isFinite(f)||f<0||p<f||Number.isNaN(p))throw new TypeError("Border minSize/maxSize must be nonnegative pixel limits, with maxSize >= minSize");if(![void 0,null,!1,!0,"close"].includes(o.drawer))throw new TypeError("drawer must be true, false or close");let h=r.ownerDocument.createElement("div");h.style.cssText=o.style??"";let m=Je(c)?"height":"width",g=typeof o[m]=="number";if(g){if(!Number.isFinite(o[m])||o[m]<0)throw new TypeError("Border numeric dimensions must be finite nonnegative pixels");h.style[m]=`${o[m]}px`}let b=h.style[m];delete o.width,delete o.height,h.style.width="100%",h.style.height="100%",o.style=h.style.cssText;let{label:y,icon:v,minimize:w=!0,onclick:D,...A}=u;if(typeof w!="boolean")throw new TypeError("drawer_minimize must be a boolean");let $=t(A),R=r.ownerDocument.createElement("div");R.style.cssText=$.style??"";let z=R.style.backgroundColor;z&&R.style.setProperty("--gramlot-drawer-background",z),$.style!=null&&($.style=R.style.cssText);let me={region:c,size:b,min:f,max:p,detachable:d,title:o.title??"",splitter:o.splitter===!0,drawer:o.drawer,hidden:o.hidden===!0,splitterAttrs:t(l),drawerAttrs:$,label:y,icon:v,minimize:w,writeParameter:M=>{g&&s(m,M)},notifications:{closableChange:M=>a("closable_change",M),splitterResize:M=>i("splitter_resize",M)},onToggle:D?(M,V)=>n("drawer_onclick",D,{evt:M,show:V}):null};for(let M of["region","splitter","drawer","minSize","maxSize","detachable","title"])delete o[M];return o.slot=c,{rest:o,config:me}}function Jo(r,e,t){for(let n of new Set([...Object.keys(t),...Object.keys(e)]))e[n]==null?r.removeAttribute(n):r.setAttribute(n,String(e[n]));return e}var Ko=(0,H.defineComponent)({name:"contentPane",tag:"gramlot-content-pane",base:ve,subTags:"*",implementation:r=>class extends r{constructor(){super();let e=this.ownerDocument.createElement("style");e.textContent=":host{min-height:0;overflow:auto}.control-box{height:100%;min-height:0}",this.shadowRoot.append(e)}projectAttributes(e){let t=super.projectAttributes(e),n=this.ownerDocument.createElement("div").style;n.cssText=t.style??"";let a=n.display==="flex"||n.display==="inline-flex";this.controlBox.style.display=a?"flex":"",this.controlBox.style.flex=a?"1 1 auto":"";let i=["flex-direction","flex-wrap","justify-content","align-items","align-content","gap","row-gap","column-gap"];for(let s of i)this.controlBox.style.removeProperty(s);if(a)for(let s=0;s<n.length;s++){let o=n.item(s);i.includes(o)&&this.controlBox.style.setProperty(o,n.getPropertyValue(o))}return t}}}),rr=(0,H.defineComponent)({name:"borderContainer",tag:"gramlot-border-container",base:ve,subTags:"*",childParameters:{detachable:{dtype:"B",default:!1},title:{dtype:"T",default:""},region:{required:!0,enum:zn,unique:!0},width:{},height:{},drawer_onclick:{inline:["evt","show"]}},parameters:{design:{dtype:"T",default:"headline",binding:"read",enum:["headline","sidebar"]},persist:{dtype:"B",default:!1,binding:"read"}},implementation:r=>class Vn extends r{static#e=new WeakMap;static projectChild(t,n,a){let{rest:i,config:s}=Kf(t,n,a);return Vn.#e.set(t,s),["borderContainer","framePane"].includes(t.parentElement?.constructor.gramlotComponent?.name)&&t.parentElement.projectRegion(t),i}#n=new Map;#t;#i;#a;#o;constructor(){super(),this.control.replaceChildren();let t=this.ownerDocument;this.#o=Zf(t.defaultView),this.#i=new t.defaultView.ResizeObserver(a=>{for(let{target:i}of a){let s=i.closest(".region");s.style.setProperty("--drawer-content-width",`${i.offsetWidth}px`),s.style.setProperty("--drawer-content-height",`${i.offsetHeight}px`)}});let n=t.createElement("style");n.textContent=`:host{min-height:0;overflow:hidden}
|
|
55
|
+
.window-surface dialog[data-collapsed] .titlebar{border-bottom:0}`,this.shell=a.createElement("dialog"),this.titlebar=a.createElement("header"),this.titlebar.className="titlebar",this.heading=a.createElement("h2"),this.heading.id="",this.heading.className="title",this.collapseButton=this.#p("Collapse window","\u2212"),this.maximizeButton=this.#p("Maximize window","\u25A1"),this.closeButton=this.#p("Close window","\xD7"),this.titlebar.append(this.heading,this.collapseButton,this.maximizeButton,this.closeButton),this.body=a.createElement("div"),this.body.className="body",this.body.append(a.createElement("slot")),this.resizeButton=this.#p("Resize window",""),this.resizeButton.className="resize";let l=a.createElementNS(oe,"svg");l.setAttribute("viewBox","0 0 16 16"),l.setAttribute("aria-hidden","true"),l.setAttribute("focusable","false");let u=a.createElementNS(oe,"path");u.setAttribute("d","M5 13 13 5M9 13l4-4"),u.setAttribute("fill","none"),u.setAttribute("stroke","currentColor"),u.setAttribute("stroke-width","1.25"),u.setAttribute("stroke-linecap","round"),l.append(u),this.resizeButton.append(l),this.status=a.createElement("div"),this.status.className="status",this.status.hidden=!0,this.status.setAttribute("role","alert"),this.shell.append(this.titlebar,this.body,this.status,this.resizeButton),s.append(o,this.shell),this.closeButton.addEventListener("click",()=>this.requestClose("close")),this.collapseButton.addEventListener("click",()=>this.#k(!this.#o,!0)),this.maximizeButton.addEventListener("click",()=>this.#m(!this.#r,!0)),this.shell.addEventListener("cancel",c=>{c.preventDefault(),this.requestClose("escape")}),this.shell.addEventListener("keydown",c=>{!this.modal&&c.key==="Escape"&&!c.defaultPrevented&&(c.preventDefault(),this.requestClose("escape"))}),this.shell.addEventListener("focusin",()=>this.#b()),this.shell.addEventListener("pointerdown",()=>this.#b());for(let[c,d]of[[this.titlebar,"move"],[this.resizeButton,"resize"]])c.addEventListener("pointerdown",f=>this.#S(f,d)),c.addEventListener("pointermove",f=>this.#I(f)),c.addEventListener("pointerup",f=>this.#T(f,!0)),c.addEventListener("pointercancel",f=>this.#T(f,!1)),c.addEventListener("lostpointercapture",f=>this.#T(f,!1)),c.addEventListener("keydown",f=>this.#B(f,d));this.#n=new a.defaultView.MutationObserver(()=>this.#g())}#p(e,t){let n=this.ownerDocument.createElement("button");return n.type="button",n.textContent=t,n.setAttribute("aria-label",e),n.title=e,n}get ownerDocument(){return this.host.ownerDocument}get opened(){return this.#i}focus(){this.#b(),this.closeButton.focus()}setSourceContext(e){this.#e=e}connect(){this.#a=!0;let e=jn.get(this.ownerDocument);e||jn.set(this.ownerDocument,e=new Set),e.add(this),this.#n.observe(this.host,{childList:!0}),this.ownerDocument.defaultView.addEventListener("resize",this.#d),this.#g()}disconnect(){jn.get(this.ownerDocument).delete(this),this.#a=!1,this.#s++,this.#l=null,this.#n.disconnect(),this.ownerDocument.defaultView.removeEventListener("resize",this.#d),this.#x(),this.shell.open&&this.shell.close(),this.#i=!1,this.#E()}configure(e){let t=this.parameters;this.parameters=e,t&&(["width","height","left","top","minWidth","minHeight"].some(n=>t[n]!==this.parameters[n])&&(this.#x(),this.#c=null,this.#o=!1,this.#r=!1),t.open!==this.parameters.open&&(this.#s++,this.#l=null),(t.movable!==this.parameters.movable||t.resizable!==this.parameters.resizable||t.docked!==this.parameters.docked)&&this.#x()),this.#g()}#g(){this.#t||(this.#t=!0,queueMicrotask(()=>{this.#t=!1,this.#a&&this.host.isConnected&&this.parameters&&this.#y()}))}#y(){this.validateContent();let e=this.parameters;if(this.heading.textContent=e.title,this.shell.setAttribute("aria-label",e.title),this.closeButton.hidden=!e.closable,this.closeButton.disabled=!!this.#l,this.collapseButton.hidden=!e.collapsible,this.maximizeButton.hidden=!e.maximizable,this.shell.toggleAttribute("data-docked",e.docked===!0),!e.open){this.#D(!1);return}if(this.#i?!e.docked&&!this.#c&&(this.#h(),this.#_()):(this.#u=this.#A(),this.#o=!1,this.#r=!1,this.body.hidden=!1,this.shell.removeAttribute("data-collapsed"),this.modal?this.shell.showModal():this.shell.show(),this.#i=!0,e.docked||(this.#h(),this.#_(),this.#b()),this.#e.publish("opened",{})),e.docked){this.body.hidden=!1,this.resizeButton.hidden=!0;return}this.#m(e.maximizable&&e.maximized,!1),this.#k(e.collapsible&&e.collapsed,!1),!e.maximizable&&e.maximized&&this.#e.writeParameter("maximized",!1),!e.collapsible&&e.collapsed&&this.#e.writeParameter("collapsed",!1)}#A(){let e=this.ownerDocument.activeElement;for(;e?.shadowRoot?.activeElement;)e=e.shadowRoot.activeElement;return e}#E(){let e=this.#u;this.#u=null,e?.isConnected&&e.focus({preventScroll:!0})}#h(){let e=this.parameters,t=this.shell.style;if(this.shell.removeAttribute("data-maximized"),t.width=e.width??"var(--gramlot-window-width,36rem)",t.height=e.height??"var(--gramlot-window-height,24rem)",t.minWidth=e.minWidth??"min(220px, calc(100vw - 16px))",t.minHeight=e.minHeight??"min(140px, calc(100dvh - 16px))",t.left=e.left??"0px",t.top=e.top??"0px",this.#c){this.#v(this.#c);return}if(!this.#c){let n=this.shell.getBoundingClientRect(),i=this.ownerDocument.defaultView;e.left==null&&(t.left=`${Math.max(8,(i.document.documentElement.clientWidth-n.width)/2)}px`),e.top==null&&(t.top=`${Math.max(8,(i.document.documentElement.clientHeight-n.height)/2)}px`)}}#_(){if(this.#r){this.#w();return}let e=this.shell.getBoundingClientRect(),t=this.ownerDocument.defaultView,n=Math.min(e.width,Math.max(0,t.document.documentElement.clientWidth-16)),i=Math.min(e.height,Math.max(0,t.document.documentElement.clientHeight-16)),a={left:Math.max(8,Math.min(e.left,t.document.documentElement.clientWidth-n-8)),top:Math.max(8,Math.min(e.top,t.document.documentElement.clientHeight-i-8)),width:n,height:i};this.#v(a),this.#o?this.#c={...this.#c,left:a.left,top:a.top,width:a.width}:this.#c=a}#v(e){for(let t of["left","top","width","height"])this.shell.style[t]=`${e[t]}px`}#b(){if(this.modal||!this.#i||this.parameters.docked)return;let e=100,t=[...jn.get(this.ownerDocument)].filter(n=>n.opened&&!n.modal&&n!==this);t.sort((n,i)=>Number(n.shell.style.zIndex)-Number(i.shell.style.zIndex)).forEach((n,i)=>n.shell.style.zIndex=String(e+i)),this.shell.style.zIndex=String(e+t.length)}#w(){let e=this.ownerDocument.documentElement,t=this.#r?{left:0,top:0,width:e.clientWidth,height:e.clientHeight}:{...this.#c};this.#o&&(t.height=this.titlebar.getBoundingClientRect().height+2),this.shell.toggleAttribute("data-maximized",this.#r),this.shell.style.minWidth=this.#r?"0":this.parameters.minWidth??"min(220px, calc(100vw - 16px))",this.shell.style.minHeight=this.#o||this.#r?"0":this.parameters.minHeight??"min(140px, calc(100dvh - 16px))",this.#v(t);let n=this.parameters.movable&&!this.#r;this.titlebar.toggleAttribute("data-movable",n),this.titlebar.tabIndex=n?0:-1,this.titlebar.setAttribute("aria-label",n?"Move window: use arrow keys, Home to reset":this.parameters.title),this.resizeButton.hidden=this.#o||this.#r||!this.parameters.resizable}#m(e,t){this.#i&&(e!==this.#r&&(this.#x(),this.#r=e),this.#w(),e||this.#_(),this.maximizeButton.textContent=e?"\u2750":"\u25A1",this.maximizeButton.setAttribute("aria-label",e?"Restore size":"Maximize window"),this.maximizeButton.title=e?"Restore size":"Maximize window",this.maximizeButton.setAttribute("aria-pressed",String(e)),t&&(this.parameters.maximized=e,this.#e.writeParameter("maximized",e)))}#k(e,t){this.#i&&(e!==this.#o&&(this.#x(),e&&this.body.contains(this.#A())&&this.collapseButton.focus(),this.#o=e),this.body.hidden=e,this.shell.toggleAttribute("data-collapsed",e),this.collapseButton.textContent=e?"\uFF0B":"\u2212",this.collapseButton.setAttribute("aria-label",e?"Expand window":"Collapse window"),this.collapseButton.title=e?"Expand window":"Collapse window",this.collapseButton.setAttribute("aria-expanded",String(!e)),this.#w(),this.#_(),t&&(this.parameters.collapsed=e,this.#e.writeParameter("collapsed",e)))}async requestClose(e="application"){if(!this.#i||!this.parameters.closable&&e!=="application")return!1;if(this.#l)return this.#l;let t=this.#s;this.status.hidden=!0;let n=async()=>{try{let i=this.parameters.beforeClose?await this.#e.callLogic(this.parameters.beforeClose,{reason:e}):!0;if(typeof i!="boolean")throw new TypeError("beforeClose must return a boolean");return!this.#a||t!==this.#s||!this.#i?!1:(i&&this.#D(!0),i)}catch(i){return this.#a&&t===this.#s&&(this.status.textContent="Unable to close: "+i.message,this.status.hidden=!1,this.ownerDocument.defaultView.console.error(i)),!1}finally{t===this.#s&&(this.#l=null,this.closeButton.disabled=!1,this.shell.removeAttribute("aria-busy"))}};return this.closeButton.disabled=!0,this.shell.setAttribute("aria-busy","true"),this.#l=Promise.resolve().then(n),this.#l}#D(e){this.#i&&(this.#s++,this.#l=null,this.#x(),this.#i=!1,this.shell.open&&this.shell.close(),this.shell.removeAttribute("aria-busy"),this.closeButton.disabled=!1,this.#E(),e&&(this.parameters.open=!1,this.#e.writeParameter("open",!1)),this.#e.publish("closed",{}))}#S(e,t){if(e.button!==0||!this.#i||this.parameters.docked||this.#r||t==="move"&&!this.parameters.movable||t==="resize"&&(!this.parameters.resizable||this.#o)||t==="move"&&e.target.closest("button"))return;e.preventDefault(),this.#x();let n=this.shell.getBoundingClientRect();this.#f={kind:t,id:e.pointerId,handle:e.currentTarget,x:e.clientX,y:e.clientY,rect:{left:n.left,top:n.top,width:n.width,height:n.height}},e.currentTarget.setPointerCapture(e.pointerId),e.currentTarget.focus()}#I(e){let t=this.#f;!t||t.id!==e.pointerId||this.#C(t.rect,e.clientX-t.x,e.clientY-t.y,t.kind)}#C(e,t,n,i){let a={...e},s=this.ownerDocument.defaultView;if(i==="move")a.left+=t,a.top+=n;else{let o=s.getComputedStyle(this.shell);a.width=Math.max(parseFloat(o.minWidth)||0,a.width+t),a.height=Math.max(parseFloat(o.minHeight)||0,a.height+n)}a.width=Math.min(a.width,Math.max(0,s.document.documentElement.clientWidth-16)),a.height=Math.min(a.height,Math.max(0,s.document.documentElement.clientHeight-16)),a.left=Math.max(8,Math.min(a.left,s.document.documentElement.clientWidth-a.width-8)),a.top=Math.max(8,Math.min(a.top,s.document.documentElement.clientHeight-a.height-8)),this.#v(a),this.#o?this.#c={...this.#c,left:a.left,top:a.top,width:a.width}:this.#c=a}#T(e,t){let n=this.#f;!n||n.id!==e.pointerId||(this.#f=null,n.handle.hasPointerCapture(n.id)&&n.handle.releasePointerCapture(n.id),t?this.#N(n.kind):(this.#v(n.rect),this.#o?this.#c={...this.#c,left:n.rect.left,top:n.rect.top,width:n.rect.width}:this.#c=n.rect))}#x(){this.#f&&this.#T({pointerId:this.#f.id},!1)}#N(e){let t=this.shell.getBoundingClientRect();for(let n of e==="move"?["left","top"]:["width","height"]){let i=`${t[n]}px`;this.#e.writeParameter(n,i)}}#B(e,t){if(e.target!==e.currentTarget||!["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home"].includes(e.key)||this.parameters.docked||this.#r||t==="move"&&!this.parameters.movable||t==="resize"&&(!this.parameters.resizable||this.#o)||e.key==="Home"&&t!=="move")return;e.preventDefault(),e.stopPropagation();let n=this.shell.getBoundingClientRect(),i=e.shiftKey?1:10;if(e.key==="Home"){let a=parseFloat(this.parameters.left),s=parseFloat(this.parameters.top);this.#C({left:n.left,top:n.top,width:n.width,height:n.height},(Number.isFinite(a)?a:8)-n.left,(Number.isFinite(s)?s:8)-n.top,t),this.#N(t);return}this.#C({left:n.left,top:n.top,width:n.width,height:n.height},e.key==="ArrowLeft"?-i:e.key==="ArrowRight"?i:0,e.key==="ArrowUp"?-i:e.key==="ArrowDown"?i:0,t),this.#N(t)}};import{createDOMPurify as Kf}from"@gramlot/gramlot";var Qf=["top","bottom","left","right"],zn=[...Qf,"center"],Je=r=>r==="top"||r==="bottom";function ep(r,e,{adapt:t,invoke:n,publish:i,publishParent:a,writeParameter:s}){let o={...e},l={},u={};for(let[M,H]of Object.entries(o))for(let[te,U]of[["splitter_",l],["drawer_",u]])M.startsWith(te)&&(U[M.slice(te.length)]=H,delete o[M]);let c=o.region,d=o.detachable??!1;if(typeof d!="boolean")throw new TypeError("detachable must be a boolean");if(!zn.includes(c))throw new TypeError(`Invalid border region: ${c}`);let f=o.minSize??0,p=o.maxSize??1/0;if(typeof f!="number"||typeof p!="number"||!Number.isFinite(f)||f<0||p<f||Number.isNaN(p))throw new TypeError("Border minSize/maxSize must be nonnegative pixel limits, with maxSize >= minSize");if(![void 0,null,!1,!0,"close"].includes(o.drawer))throw new TypeError("drawer must be true, false or close");let h=r.ownerDocument.createElement("div");h.style.cssText=o.style??"";let m=Je(c)?"height":"width",g=typeof o[m]=="number";if(g){if(!Number.isFinite(o[m])||o[m]<0)throw new TypeError("Border numeric dimensions must be finite nonnegative pixels");h.style[m]=`${o[m]}px`}let b=h.style[m];delete o.width,delete o.height,h.style.width="100%",h.style.height="100%",o.style=h.style.cssText;let{label:y,icon:v,minimize:w=!0,onclick:D,...A}=u;if(typeof w!="boolean")throw new TypeError("drawer_minimize must be a boolean");let $=t(A),R=r.ownerDocument.createElement("div");R.style.cssText=$.style??"";let V=R.style.backgroundColor;V&&R.style.setProperty("--gramlot-drawer-background",V),$.style!=null&&($.style=R.style.cssText);let me={region:c,size:b,min:f,max:p,detachable:d,title:o.title??"",splitter:o.splitter===!0,drawer:o.drawer,hidden:o.hidden===!0,splitterAttrs:t(l),drawerAttrs:$,label:y,icon:v,minimize:w,writeParameter:M=>{g&&s(m,M)},notifications:{closableChange:M=>i("closable_change",M),splitterResize:M=>a("splitter_resize",M)},onToggle:D?(M,H)=>n("drawer_onclick",D,{evt:M,show:H}):null};for(let M of["region","splitter","drawer","minSize","maxSize","detachable","title"])delete o[M];return o.slot=c,{rest:o,config:me}}function Qo(r,e,t){for(let n of new Set([...Object.keys(t),...Object.keys(e)]))e[n]==null?r.removeAttribute(n):r.setAttribute(n,String(e[n]));return e}var el=(0,q.defineComponent)({name:"contentPane",tag:"gramlot-content-pane",base:ve,subTags:"*",implementation:r=>class extends r{constructor(){super();let e=this.ownerDocument.createElement("style");e.textContent=":host{min-height:0;overflow:auto}.control-box{height:100%;min-height:0}",this.shadowRoot.append(e)}projectAttributes(e){let t=super.projectAttributes(e),n=this.ownerDocument.createElement("div").style;n.cssText=t.style??"";let i=n.display==="flex"||n.display==="inline-flex";this.controlBox.style.display=i?"flex":"",this.controlBox.style.flex=i?"1 1 auto":"";let a=["flex-direction","flex-wrap","justify-content","align-items","align-content","gap","row-gap","column-gap"];for(let s of a)this.controlBox.style.removeProperty(s);if(i)for(let s=0;s<n.length;s++){let o=n.item(s);a.includes(o)&&this.controlBox.style.setProperty(o,n.getPropertyValue(o))}return t}}}),rr=(0,q.defineComponent)({name:"borderContainer",tag:"gramlot-border-container",base:ve,subTags:"*",childParameters:{detachable:{dtype:"B",default:!1},title:{dtype:"T",default:""},region:{required:!0,enum:zn,unique:!0},width:{},height:{},drawer_onclick:{inline:["evt","show"]}},parameters:{design:{dtype:"T",default:"headline",binding:"read",enum:["headline","sidebar"]},persist:{dtype:"B",default:!1,binding:"read"}},implementation:r=>class Vn extends r{static#e=new WeakMap;static projectChild(t,n,i){let{rest:a,config:s}=ep(t,n,i);return Vn.#e.set(t,s),["borderContainer","framePane"].includes(t.parentElement?.constructor.gramlotComponent?.name)&&t.parentElement.projectRegion(t),a}#n=new Map;#t;#a;#i;#o;constructor(){super(),this.control.replaceChildren();let t=this.ownerDocument;this.#o=Kf(t.defaultView),this.#a=new t.defaultView.ResizeObserver(i=>{for(let{target:a}of i){let s=a.closest(".region");s.style.setProperty("--drawer-content-width",`${a.offsetWidth}px`),s.style.setProperty("--drawer-content-height",`${a.offsetHeight}px`)}});let n=t.createElement("style");n.textContent=`:host{min-height:0;overflow:hidden}
|
|
52
56
|
.control-box{height:100%;min-height:0;display:grid;
|
|
53
57
|
grid-template-columns:var(--left,0px) minmax(0,1fr) var(--right,0px);
|
|
54
58
|
grid-template-rows:var(--top,0px) minmax(0,1fr) var(--bottom,0px);
|
|
@@ -156,9 +160,9 @@ ${" ".repeat(a)}</${s}>`:`<${s}${l}>${f}</${s}>`:t===null||t.includes(s)?`<${s}
|
|
|
156
160
|
@media (prefers-reduced-motion:reduce){.drawer,.drawer-reveal .drawer-content,.control-box[data-drawer-motion],.control-box[data-drawer-motion] .viewport{transition:none!important}}
|
|
157
161
|
.drawer[hidden],.separator[hidden]{display:none}
|
|
158
162
|
.drag-cover{position:absolute;inset:0;z-index:4;display:none}
|
|
159
|
-
:host{position:relative}.drag-cover[data-active]{display:block}`;for(let a of zn){let i=t.createElement("div");i.className="region",i.style.gridArea=a;let s=t.createElement("div");s.className="viewport",i.dataset.side=a,s.id=`region-${a}`;let o=t.createElement("slot");o.name=a,s.append(o),i.append(s);let l={cell:i,viewport:s,child:null,config:null,visibility:null,closed:!1,suppressDrawerClick:!1,size:null,splitterAttrs:{},drawerAttrs:{},surface:null},u=t.createElement("div"),c=t.createElement("span"),d=t.createElement("button");u.className="region-tools",u.hidden=!0,c.className="region-title",d.type="button",d.className="detach";let f=t.createElementNS(oe,"svg"),p=t.createElementNS(oe,"path");f.setAttribute("viewBox","0 0 20 20"),f.setAttribute("aria-hidden","true"),p.setAttribute("d","M11 3h6v6M17 3l-8 8M8 4H4v12h12v-4"),p.setAttribute("fill","none"),p.setAttribute("stroke","currentColor"),p.setAttribute("stroke-width","1.8"),p.setAttribute("stroke-linecap","round"),p.setAttribute("stroke-linejoin","round"),f.append(p),d.append(f),u.append(c,d),s.prepend(u),Object.assign(l,{tools:u,title:c,detach:d});let h=null,m=!1;if(d.addEventListener("pointerdown",g=>{g.button===0&&(h={id:g.pointerId,x:g.clientX,y:g.clientY},m=!1,d.setPointerCapture(g.pointerId))}),d.addEventListener("pointerup",g=>{if(!h||h.id!==g.pointerId)return;let b=h;h=null,d.hasPointerCapture(g.pointerId)&&d.releasePointerCapture(g.pointerId),m=Math.hypot(g.clientX-b.x,g.clientY-b.y)>5,m&&this.detachRegion(a,{left:g.clientX,top:g.clientY})}),d.addEventListener("pointercancel",()=>{h=null,m=!1}),d.addEventListener("click",()=>{m||this.detachRegion(a),m=!1}),a!=="center"){let g=t.createElement("div");g.className="separator",g.dataset.side=a,g.dataset.axis=Je(a)?"y":"x",g.setAttribute("role","separator"),g.setAttribute("aria-label",`Resize ${a} region`),g.setAttribute("aria-orientation",Je(a)?"horizontal":"vertical"),g.setAttribute("aria-controls",s.id);let b=t.createElement("button");b.type="button",b.className="drawer",b.setAttribute("aria-controls",s.id);let y=t.createElement("span");y.className="drawer-icon",y.setAttribute("aria-hidden","true");let v=t.createElement("span");v.className="drawer-label";let w=t.createElement("span");w.className="drawer-content";let D=t.createElement("span");D.className="drawer-viewport",w.append(y,v),D.append(w),b.append(D),g.append(b),i.append(g),b.addEventListener("pointerdown",A=>{A.button===0&&b.setAttribute("data-active","")});for(let A of["pointerup","pointercancel","lostpointercapture","pointerleave"])b.addEventListener(A,$=>{(A!=="pointerleave"||!b.hasPointerCapture($.pointerId))&&b.removeAttribute("data-active")});Object.assign(l,{separator:g,drawer:b,drawerIcon:y,drawerLabel:v,drawerContent:w}),g.addEventListener("pointerdown",A=>this.#u(a,A)),g.addEventListener("keydown",A=>this.#f(a,A)),b.addEventListener("click",A=>{if(A.stopPropagation(),l.suppressDrawerClick&&A.detail!==0){l.suppressDrawerClick=!1;return}l.closed=!l.closed,this.#l(a,!0),l.config.onToggle?.(A,!l.closed)})}this.#n.set(a,l),this.control.append(i),o.addEventListener("slotchange",()=>this.#r())}this.cover=t.createElement("div"),this.cover.className="drag-cover",this.shadowRoot.append(n,this.cover),this.control.addEventListener("transitionend",a=>{if(a.target===this.control){this.control.removeAttribute("data-drawer-motion");for(let[i,s]of this.#n)s.separator?.setAttribute("aria-valuenow",String(Math.round(this.#s(i))))}}),this.#t=new t.defaultView.MutationObserver(()=>this.#r())}connectedCallback(){this.#t.observe(this,{childList:!0});for(let t of this.#n.values())t.drawerContent&&this.#i.observe(t.drawerContent);this.#r()}disconnectedCallback(){this.#t.disconnect(),this.#i.disconnect(),this.#d();for(let t of zn)this.reattachRegion(t,!1)}projectAttributes(t,n){let a=super.projectAttributes(t,n);if(!["headline","sidebar"].includes(this.parameters.design))throw new TypeError("Invalid border design");if(Object.hasOwn(t,"liveSplitters"))throw new TypeError("Border splitters are always live; omit liveSplitters");if(this.parameters.persist&&!t.id)throw new TypeError("Persistent borderContainer requires a stable id");return this.control.dataset.design=this.parameters.design,a}#r(){let t=new Map;for(let n of this.children){let a=Vn.#e.get(n);if(a){if(t.has(a.region))throw new Error(`Duplicate border region: ${a.region}`);t.set(a.region,n)}}for(let[n,a]of this.#n){let i=t.get(n)??null;a.child!==i&&(this.#a?.side===n&&this.#d(),this.reattachRegion(n,!1),a.child=i,a.config=null,a.visibility=null,a.size=null,a.closed=!1),i?this.projectRegion(i):(a.config=null,this.#l(n))}}projectRegion(t){let n=Vn.#e.get(t),a=n.region,i=this.#n.get(a);if(i.child!==t){this.#r();return}let s=i.config;if((!s||s.size!==n.size)&&(i.size=n.size||"auto",!s&&this.parameters.persist)){let o=this.ownerDocument.cookie.split("; ").find(l=>l.startsWith(`${this.#g(a)}=`));o&&(i.size=decodeURIComponent(o.split("=").slice(1).join("=")))}(!s||s.drawer!==n.drawer)&&(i.closed=n.drawer==="close"),i.config=n,(!n.detachable||n.hidden||i.closed)&&this.reattachRegion(a,!1),i.surface&&i.surface.configure({...i.surface.parameters,title:n.title||a}),a!=="center"&&(i.splitterAttrs=Jo(i.separator,n.splitterAttrs,i.splitterAttrs),i.drawerAttrs=Jo(i.drawer,n.drawerAttrs,i.drawerAttrs),i.separator.classList.add("separator"),i.drawer.classList.add("drawer"),i.drawer.classList.toggle("drawer-reveal",n.minimize),i.drawer.classList.toggle("drawer-rotated",!Je(a)),i.drawerLabel.replaceChildren(this.#o.sanitize(n.label??"",{USE_PROFILES:{html:!0},FORBID_TAGS:["style","form","input","button","select","textarea"],RETURN_DOM_FRAGMENT:!0})),i.drawerIcon.textContent=n.icon??"",i.drawerIcon.hidden=!n.icon,i.drawer.toggleAttribute("data-icon",!!n.icon),i.drawer.toggleAttribute("data-labelled",!!n.label)),this.#l(a)}#l(t,n=!1){let a=this.#n.get(t),i=a.config,s=!!i&&!i.hidden&&!a.closed,o=a.visibility;if(a.visibility=i?{open:s,drawer:!!i.drawer}:null,a.viewport.inert=!s,o&&o.open!==s&&(this.control.toggleAttribute("data-drawer-motion",!!i?.drawer&&n&&!this.#a),this.control.hasAttribute("data-drawer-motion")&&this.ownerDocument.defaultView.getComputedStyle(this.control).transitionDuration.split(",").every(c=>Number.parseFloat(c)===0)&&this.control.removeAttribute("data-drawer-motion")),a.viewport.hidden=!s,a.viewport.classList.toggle("has-tools",!!i?.detachable),a.tools.hidden=!i?.detachable||!!a.surface,a.title.textContent=i?.title||t,a.detach.setAttribute("aria-label",`Detach ${i?.title||t}`),a.detach.title=a.detach.getAttribute("aria-label"),t==="center")return;this.control.style.setProperty(`--${t}`,s&&!a.surface?a.size:"0px"),a.separator.hidden=!!a.surface||!i||i.hidden||!i.splitter&&!i.drawer;let l=s&&i.splitter;a.cell.style.setProperty("--region-splitter",l?a.separator.style[Je(t)?"height":"width"]||"var(--gramlot-splitter-size,1px)":"0px"),a.separator.dataset.draggable=String(!!l),a.separator.setAttribute("role",l?"separator":"presentation"),a.separator.tabIndex=l?0:-1,a.drawer.hidden=!i?.drawer,a.drawer.toggleAttribute("data-resizable",!!i?.splitter),a.drawer.setAttribute("aria-expanded",String(s)),a.drawer.setAttribute("aria-label",`${s?"Close":"Open"} ${t} region`),a.drawer.title=i?.drawerAttrs.title??a.drawer.getAttribute("aria-label"),a.separator.setAttribute("aria-valuemin",String(i?.min??0)),a.separator.setAttribute("aria-valuenow",String(Math.round(this.#s(t)))),i&&Number.isFinite(i.max)?a.separator.setAttribute("aria-valuemax",String(i.max)):a.separator.removeAttribute("aria-valuemax"),i&&o&&(o.drawer||i.drawer)&&o.open!==s&&i.notifications.closableChange({open:s,region:t})}detachRegion(t,n=null){let a=this.#n.get(t),i=a.config;if(!i?.detachable||i.hidden||a.closed)return;if(a.surface){a.surface.focus();return}let s=a.viewport.getBoundingClientRect(),o=this.ownerDocument.createElement("div");this.shadowRoot.append(o);let l=new pt(this,o,{modal:!1,validateContent:()=>{if(a.viewport.parentNode!==l.body)throw new Error("Detached region lost its presentation")}});a.surface=l,a.mount=o,l.body.replaceChildren(a.viewport),a.viewport.style.cssText="flex:1;min-width:0;height:100%;",l.setSourceContext({writeParameter:(u,c)=>{l.parameters[u]=c},publish:u=>{u==="closed"&&this.reattachRegion(t)}}),l.configure({title:i.title||t,open:!0,movable:!0,resizable:!0,collapsible:!1,maximizable:!1,maximized:!1,collapsed:!1,closable:!0,beforeClose:null,width:`${Math.max(320,Math.min(s.width,720))}px`,height:`${Math.max(240,Math.min(s.height,560))}px`,left:n?`${n.left}px`:null,top:n?`${n.top}px`:null,minWidth:"220px",minHeight:"140px"}),this.#l(t),l.connect()}reattachRegion(t,n=!0){let a=this.#n.get(t);if(!a.surface)return;let i=a.surface;a.surface=null,a.cell.prepend(a.viewport),a.viewport.style.cssText="",i.disconnect(),a.mount.remove(),a.mount=null,this.#l(t),n&&a.child?.isConnected&&!a.closed&&a.detach.focus()}#s(t){let n=this.#n.get(t).cell.getBoundingClientRect();return Je(t)?n.height:n.width}#c(t,n){this.control.removeAttribute("data-drawer-motion");let a=this.#n.get(t),i=a.config,s={left:"right",right:"left",top:"bottom",bottom:"top"}[t],o=this.control.getBoundingClientRect(),l=Math.max(0,(Je(t)?o.height:o.width)-this.#s(s)),u=Math.max(Math.min(i.min,l),Math.min(n,i.max,l));a.size=`${u}px`,this.#l(t),i.writeParameter(u)}#f(t,n){let a=this.#n.get(t);if(n.target!==a.separator||!a.config?.splitter||a.closed)return;let i=Je(t)?["ArrowUp","ArrowDown"]:["ArrowLeft","ArrowRight"];if(!i.includes(n.key))return;n.preventDefault();let s=["left","top"].includes(t)?1:-1,o=this.#s(t);this.#c(t,o+(n.key===i[0]?-1:1)*s),this.#p(t,o)}#u(t,n){let a=this.#n.get(t);if(n.button!==0||(a.suppressDrawerClick=!1,!a.config?.splitter))return;let i=a.drawer.contains(n.target);i||n.preventDefault(),this.#d();let s=Je(t)?"clientY":"clientX",o=n[s],l=this.#s(t),u=["left","top"].includes(t)?1:-1,c=new this.ownerDocument.defaultView.AbortController,d=i?a.drawer:a.separator,f=n.pointerId,p=!i;this.#a={side:t,controller:c,captureTarget:d,pointerId:f},d.setPointerCapture(f),p&&this.cover.setAttribute("data-active","");let h={signal:c.signal};d.addEventListener("pointermove",g=>{if(g.pointerId!==f)return;let b=g[s]-o;if(!p&&Math.abs(b)<4||(a.suppressDrawerClick=i,a.closed&&u*b<=0))return;let y=a.closed;a.closed=!1,p=!0,this.cover.setAttribute("data-active",""),this.#c(t,l+u*b),y&&a.config.onToggle?.(g,!0)},h);let m=g=>{g.pointerId===f&&(this.#d(),p&&this.#p(t,l))};d.addEventListener("pointerup",m,h),d.addEventListener("pointercancel",m,h),d.addEventListener("lostpointercapture",m,h)}#d(){if(!this.#a)return;let{controller:t,captureTarget:n,pointerId:a}=this.#a;this.#a=null,t.abort(),this.cover.removeAttribute("data-active"),n.hasPointerCapture(a)&&n.releasePointerCapture(a)}#p(t,n){let a=this.#n.get(t),i=this.#s(t);i!==n&&(this.#y(t),a.config.notifications.splitterResize({region:t,size:`${i}px`,previousSize:`${n}px`}))}#g(t){return encodeURIComponent(`gramlot-border-${this.id}-${t}`)}#y(t){this.parameters.persist&&(this.ownerDocument.cookie=`${this.#g(t)}=${encodeURIComponent(this.#n.get(t).size)}; Path=/; SameSite=Lax`)}}}),Qo=(0,H.defineComponent)({name:"framePane",tag:"gramlot-frame-pane",base:rr.base,parameters:rr.parameters,childParameters:rr.childParameters,subTags:"contentPane",implementation:rr.implementation});function li(r){return class Hn extends ve(r){static#e=new WeakMap;static#n=0;static projectChild(t,n,a){let{pageName:i=null,title:s="",icon:o="",badge:l=null,badge_color:u="",closable:c=!1,detachable:d=!1,onClose:f,hidden:p=!1,disabled:h=!1,...m}=n;if(i!==null&&typeof i!="string")throw new TypeError("pageName must be a string");if(typeof c!="boolean")throw new TypeError("closable must be a boolean");if(typeof d!="boolean")throw new TypeError("detachable must be a boolean");let g=Hn.#e,b=g.get(t)?.slot??`panel-${++Hn.#n}`;return g.set(t,{pageName:i,title:s,icon:o,badge:l,badge_color:u,closable:c,detachable:d,hidden:p,disabled:h,slot:b,remove:a.remove,allowClose:()=>f==null?!0:a.invoke("onClose",f,{})}),m.slot=b,t.parentElement&&t.parentElement.scheduleSelection(),m}#t=new Map;#i=null;#a=!1;#o=!1;#r={selectedPage:null,selected:null};#l;#s;constructor(){super(),this.control.replaceChildren(),this.control.className="control-box selection";let t=this.ownerDocument.createElement("style");t.textContent=`:host{min-height:0;overflow:hidden}.selection{height:100%;min-height:0;display:flex;flex-direction:column}
|
|
163
|
+
:host{position:relative}.drag-cover[data-active]{display:block}`;for(let i of zn){let a=t.createElement("div");a.className="region",a.style.gridArea=i;let s=t.createElement("div");s.className="viewport",a.dataset.side=i,s.id=`region-${i}`;let o=t.createElement("slot");o.name=i,s.append(o),a.append(s);let l={cell:a,viewport:s,child:null,config:null,visibility:null,closed:!1,suppressDrawerClick:!1,size:null,splitterAttrs:{},drawerAttrs:{},surface:null},u=t.createElement("div"),c=t.createElement("span"),d=t.createElement("button");u.className="region-tools",u.hidden=!0,c.className="region-title",d.type="button",d.className="detach";let f=t.createElementNS(oe,"svg"),p=t.createElementNS(oe,"path");f.setAttribute("viewBox","0 0 20 20"),f.setAttribute("aria-hidden","true"),p.setAttribute("d","M11 3h6v6M17 3l-8 8M8 4H4v12h12v-4"),p.setAttribute("fill","none"),p.setAttribute("stroke","currentColor"),p.setAttribute("stroke-width","1.8"),p.setAttribute("stroke-linecap","round"),p.setAttribute("stroke-linejoin","round"),f.append(p),d.append(f),u.append(c,d),s.prepend(u),Object.assign(l,{tools:u,title:c,detach:d});let h=null,m=!1;if(d.addEventListener("pointerdown",g=>{g.button===0&&(h={id:g.pointerId,x:g.clientX,y:g.clientY},m=!1,d.setPointerCapture(g.pointerId))}),d.addEventListener("pointerup",g=>{if(!h||h.id!==g.pointerId)return;let b=h;h=null,d.hasPointerCapture(g.pointerId)&&d.releasePointerCapture(g.pointerId),m=Math.hypot(g.clientX-b.x,g.clientY-b.y)>5,m&&this.detachRegion(i,{left:g.clientX,top:g.clientY})}),d.addEventListener("pointercancel",()=>{h=null,m=!1}),d.addEventListener("click",()=>{m||this.detachRegion(i),m=!1}),i!=="center"){let g=t.createElement("div");g.className="separator",g.dataset.side=i,g.dataset.axis=Je(i)?"y":"x",g.setAttribute("role","separator"),g.setAttribute("aria-label",`Resize ${i} region`),g.setAttribute("aria-orientation",Je(i)?"horizontal":"vertical"),g.setAttribute("aria-controls",s.id);let b=t.createElement("button");b.type="button",b.className="drawer",b.setAttribute("aria-controls",s.id);let y=t.createElement("span");y.className="drawer-icon",y.setAttribute("aria-hidden","true");let v=t.createElement("span");v.className="drawer-label";let w=t.createElement("span");w.className="drawer-content";let D=t.createElement("span");D.className="drawer-viewport",w.append(y,v),D.append(w),b.append(D),g.append(b),a.append(g),b.addEventListener("pointerdown",A=>{A.button===0&&b.setAttribute("data-active","")});for(let A of["pointerup","pointercancel","lostpointercapture","pointerleave"])b.addEventListener(A,$=>{(A!=="pointerleave"||!b.hasPointerCapture($.pointerId))&&b.removeAttribute("data-active")});Object.assign(l,{separator:g,drawer:b,drawerIcon:y,drawerLabel:v,drawerContent:w}),g.addEventListener("pointerdown",A=>this.#u(i,A)),g.addEventListener("keydown",A=>this.#f(i,A)),b.addEventListener("click",A=>{if(A.stopPropagation(),l.suppressDrawerClick&&A.detail!==0){l.suppressDrawerClick=!1;return}l.closed=!l.closed,this.#l(i,!0),l.config.onToggle?.(A,!l.closed)})}this.#n.set(i,l),this.control.append(a),o.addEventListener("slotchange",()=>this.#r())}this.cover=t.createElement("div"),this.cover.className="drag-cover",this.shadowRoot.append(n,this.cover),this.control.addEventListener("transitionend",i=>{if(i.target===this.control){this.control.removeAttribute("data-drawer-motion");for(let[a,s]of this.#n)s.separator?.setAttribute("aria-valuenow",String(Math.round(this.#s(a))))}}),this.#t=new t.defaultView.MutationObserver(()=>this.#r())}connectedCallback(){this.#t.observe(this,{childList:!0});for(let t of this.#n.values())t.drawerContent&&this.#a.observe(t.drawerContent);this.#r()}disconnectedCallback(){this.#t.disconnect(),this.#a.disconnect(),this.#d();for(let t of zn)this.reattachRegion(t,!1)}projectAttributes(t,n){let i=super.projectAttributes(t,n);if(!["headline","sidebar"].includes(this.parameters.design))throw new TypeError("Invalid border design");if(Object.hasOwn(t,"liveSplitters"))throw new TypeError("Border splitters are always live; omit liveSplitters");if(this.parameters.persist&&!t.id)throw new TypeError("Persistent borderContainer requires a stable id");return this.control.dataset.design=this.parameters.design,i}#r(){let t=new Map;for(let n of this.children){let i=Vn.#e.get(n);if(i){if(t.has(i.region))throw new Error(`Duplicate border region: ${i.region}`);t.set(i.region,n)}}for(let[n,i]of this.#n){let a=t.get(n)??null;i.child!==a&&(this.#i?.side===n&&this.#d(),this.reattachRegion(n,!1),i.child=a,i.config=null,i.visibility=null,i.size=null,i.closed=!1),a?this.projectRegion(a):(i.config=null,this.#l(n))}}projectRegion(t){let n=Vn.#e.get(t),i=n.region,a=this.#n.get(i);if(a.child!==t){this.#r();return}let s=a.config;if((!s||s.size!==n.size)&&(a.size=n.size||"auto",!s&&this.parameters.persist)){let o=this.ownerDocument.cookie.split("; ").find(l=>l.startsWith(`${this.#g(i)}=`));o&&(a.size=decodeURIComponent(o.split("=").slice(1).join("=")))}(!s||s.drawer!==n.drawer)&&(a.closed=n.drawer==="close"),a.config=n,(!n.detachable||n.hidden||a.closed)&&this.reattachRegion(i,!1),a.surface&&a.surface.configure({...a.surface.parameters,title:n.title||i}),i!=="center"&&(a.splitterAttrs=Qo(a.separator,n.splitterAttrs,a.splitterAttrs),a.drawerAttrs=Qo(a.drawer,n.drawerAttrs,a.drawerAttrs),a.separator.classList.add("separator"),a.drawer.classList.add("drawer"),a.drawer.classList.toggle("drawer-reveal",n.minimize),a.drawer.classList.toggle("drawer-rotated",!Je(i)),a.drawerLabel.replaceChildren(this.#o.sanitize(n.label??"",{USE_PROFILES:{html:!0},FORBID_TAGS:["style","form","input","button","select","textarea"],RETURN_DOM_FRAGMENT:!0})),a.drawerIcon.textContent=n.icon??"",a.drawerIcon.hidden=!n.icon,a.drawer.toggleAttribute("data-icon",!!n.icon),a.drawer.toggleAttribute("data-labelled",!!n.label)),this.#l(i)}#l(t,n=!1){let i=this.#n.get(t),a=i.config,s=!!a&&!a.hidden&&!i.closed,o=i.visibility;if(i.visibility=a?{open:s,drawer:!!a.drawer}:null,i.viewport.inert=!s,o&&o.open!==s&&(this.control.toggleAttribute("data-drawer-motion",!!a?.drawer&&n&&!this.#i),this.control.hasAttribute("data-drawer-motion")&&this.ownerDocument.defaultView.getComputedStyle(this.control).transitionDuration.split(",").every(c=>Number.parseFloat(c)===0)&&this.control.removeAttribute("data-drawer-motion")),i.viewport.hidden=!s,i.viewport.classList.toggle("has-tools",!!a?.detachable),i.tools.hidden=!a?.detachable||!!i.surface,i.title.textContent=a?.title||t,i.detach.setAttribute("aria-label",`Detach ${a?.title||t}`),i.detach.title=i.detach.getAttribute("aria-label"),t==="center")return;this.control.style.setProperty(`--${t}`,s&&!i.surface?i.size:"0px"),i.separator.hidden=!!i.surface||!a||a.hidden||!a.splitter&&!a.drawer;let l=s&&a.splitter;i.cell.style.setProperty("--region-splitter",l?i.separator.style[Je(t)?"height":"width"]||"var(--gramlot-splitter-size,1px)":"0px"),i.separator.dataset.draggable=String(!!l),i.separator.setAttribute("role",l?"separator":"presentation"),i.separator.tabIndex=l?0:-1,i.drawer.hidden=!a?.drawer,i.drawer.toggleAttribute("data-resizable",!!a?.splitter),i.drawer.setAttribute("aria-expanded",String(s)),i.drawer.setAttribute("aria-label",`${s?"Close":"Open"} ${t} region`),i.drawer.title=a?.drawerAttrs.title??i.drawer.getAttribute("aria-label"),i.separator.setAttribute("aria-valuemin",String(a?.min??0)),i.separator.setAttribute("aria-valuenow",String(Math.round(this.#s(t)))),a&&Number.isFinite(a.max)?i.separator.setAttribute("aria-valuemax",String(a.max)):i.separator.removeAttribute("aria-valuemax"),a&&o&&(o.drawer||a.drawer)&&o.open!==s&&a.notifications.closableChange({open:s,region:t})}detachRegion(t,n=null){let i=this.#n.get(t),a=i.config;if(!a?.detachable||a.hidden||i.closed)return;if(i.surface){i.surface.focus();return}let s=i.viewport.getBoundingClientRect(),o=this.ownerDocument.createElement("div");this.shadowRoot.append(o);let l=new pt(this,o,{modal:!1,validateContent:()=>{if(i.viewport.parentNode!==l.body)throw new Error("Detached region lost its presentation")}});i.surface=l,i.mount=o,l.body.replaceChildren(i.viewport),i.viewport.style.cssText="flex:1;min-width:0;height:100%;",l.setSourceContext({writeParameter:(u,c)=>{l.parameters[u]=c},publish:u=>{u==="closed"&&this.reattachRegion(t)}}),l.configure({title:a.title||t,open:!0,movable:!0,resizable:!0,collapsible:!1,maximizable:!1,maximized:!1,collapsed:!1,closable:!0,beforeClose:null,width:`${Math.max(320,Math.min(s.width,720))}px`,height:`${Math.max(240,Math.min(s.height,560))}px`,left:n?`${n.left}px`:null,top:n?`${n.top}px`:null,minWidth:"220px",minHeight:"140px"}),this.#l(t),l.connect()}reattachRegion(t,n=!0){let i=this.#n.get(t);if(!i.surface)return;let a=i.surface;i.surface=null,i.cell.prepend(i.viewport),i.viewport.style.cssText="",a.disconnect(),i.mount.remove(),i.mount=null,this.#l(t),n&&i.child?.isConnected&&!i.closed&&i.detach.focus()}#s(t){let n=this.#n.get(t).cell.getBoundingClientRect();return Je(t)?n.height:n.width}#c(t,n){this.control.removeAttribute("data-drawer-motion");let i=this.#n.get(t),a=i.config,s={left:"right",right:"left",top:"bottom",bottom:"top"}[t],o=this.control.getBoundingClientRect(),l=this.#n.get("center").config?.min??0,u=Math.max(0,(Je(t)?o.height:o.width)-this.#s(s)-l),c=Math.max(Math.min(a.min,u),Math.min(n,a.max,u));i.size=`${c}px`,this.#l(t),a.writeParameter(c)}#f(t,n){let i=this.#n.get(t);if(n.target!==i.separator||!i.config?.splitter||i.closed)return;let a=Je(t)?["ArrowUp","ArrowDown"]:["ArrowLeft","ArrowRight"];if(!a.includes(n.key)&&!["Home","End"].includes(n.key))return;n.preventDefault();let s=["left","top"].includes(t)?1:-1,o=this.#s(t),l=n.key==="Home"?i.config.min:n.key==="End"?i.config.max:o+(n.key===a[0]?-1:1)*s;this.#c(t,l),this.#p(t,o)}#u(t,n){let i=this.#n.get(t);if(n.button!==0||(i.suppressDrawerClick=!1,!i.config?.splitter))return;let a=i.drawer.contains(n.target);a||n.preventDefault(),this.#d();let s=Je(t)?"clientY":"clientX",o=n[s],l=this.#s(t),u=["left","top"].includes(t)?1:-1,c=new this.ownerDocument.defaultView.AbortController,d=a?i.drawer:i.separator,f=n.pointerId,p=!a;this.#i={side:t,controller:c,captureTarget:d,pointerId:f},d.setPointerCapture(f),p&&this.cover.setAttribute("data-active","");let h={signal:c.signal};d.addEventListener("pointermove",g=>{if(g.pointerId!==f)return;let b=g[s]-o;if(!p&&Math.abs(b)<4||(i.suppressDrawerClick=a,i.closed&&u*b<=0))return;let y=i.closed;i.closed=!1,p=!0,this.cover.setAttribute("data-active",""),this.#c(t,l+u*b),y&&i.config.onToggle?.(g,!0)},h);let m=g=>{g.pointerId===f&&(this.#d(),p&&this.#p(t,l))};d.addEventListener("pointerup",m,h),d.addEventListener("pointercancel",m,h),d.addEventListener("lostpointercapture",m,h)}#d(){if(!this.#i)return;let{controller:t,captureTarget:n,pointerId:i}=this.#i;this.#i=null,t.abort(),this.cover.removeAttribute("data-active"),n.hasPointerCapture(i)&&n.releasePointerCapture(i)}#p(t,n){let i=this.#n.get(t),a=this.#s(t);a!==n&&(this.#y(t),i.config.notifications.splitterResize({region:t,size:`${a}px`,previousSize:`${n}px`}))}#g(t){return encodeURIComponent(`gramlot-border-${this.id}-${t}`)}#y(t){this.parameters.persist&&(this.ownerDocument.cookie=`${this.#g(t)}=${encodeURIComponent(this.#n.get(t).size)}; Path=/; SameSite=Lax`)}}}),tl=(0,q.defineComponent)({name:"framePane",tag:"gramlot-frame-pane",base:rr.base,parameters:rr.parameters,childParameters:rr.childParameters,subTags:"contentPane",implementation:rr.implementation});function ca(r){return class Hn extends ve(r){static#e=new WeakMap;static#n=0;static projectChild(t,n,i){let{pageName:a=null,title:s="",icon:o="",badge:l=null,badge_color:u="",closable:c=!1,detachable:d=!1,onClose:f,hidden:p=!1,disabled:h=!1,...m}=n;if(a!==null&&typeof a!="string")throw new TypeError("pageName must be a string");if(typeof c!="boolean")throw new TypeError("closable must be a boolean");if(typeof d!="boolean")throw new TypeError("detachable must be a boolean");let g=Hn.#e,b=g.get(t)?.slot??`panel-${++Hn.#n}`;return g.set(t,{pageName:a,title:s,icon:o,badge:l,badge_color:u,closable:c,detachable:d,hidden:p,disabled:h,slot:b,remove:i.remove,allowClose:()=>f==null?!0:i.invoke("onClose",f,{})}),m.slot=b,t.parentElement&&t.parentElement.scheduleSelection(),m}#t=new Map;#a=null;#i=!1;#o=!1;#r={selectedPage:null,selected:null};#l;#s;constructor(){super(),this.control.replaceChildren(),this.control.className="control-box selection";let t=this.ownerDocument.createElement("style");t.textContent=`:host{min-height:0;overflow:hidden}.selection{height:100%;min-height:0;display:flex;flex-direction:column}
|
|
160
164
|
.panels{flex:1;min-height:0;min-width:0;position:relative}.panel{height:100%;min-height:0;overflow:auto}
|
|
161
|
-
.panel[hidden]{display:none}::slotted(*){height:100%;min-height:0}`,this.panelArea=this.ownerDocument.createElement("div"),this.panelArea.className="panels",this.control.append(this.panelArea),this.shadowRoot.append(t),this.#l=new this.ownerDocument.defaultView.MutationObserver(()=>this.scheduleSelection())}setSourceContext(t){this.#s=t}connectedCallback(){this.#l.observe(this,{childList:!0}),this.scheduleSelection()}disconnectedCallback(){this.#l.disconnect();for(let t of this.#t.values())this.reattachPanel(t,!1)}scheduleSelection(){this.#o||(this.#o=!0,queueMicrotask(()=>{this.#o=!1,this.isConnected&&this.#c()}))}projectAttributes(t,n){let
|
|
165
|
+
.panel[hidden]{display:none}::slotted(*){height:100%;min-height:0}`,this.panelArea=this.ownerDocument.createElement("div"),this.panelArea.className="panels",this.control.append(this.panelArea),this.shadowRoot.append(t),this.#l=new this.ownerDocument.defaultView.MutationObserver(()=>this.scheduleSelection())}setSourceContext(t){this.#s=t}connectedCallback(){this.#l.observe(this,{childList:!0}),this.scheduleSelection()}disconnectedCallback(){this.#l.disconnect();for(let t of this.#t.values())this.reattachPanel(t,!1)}scheduleSelection(){this.#o||(this.#o=!0,queueMicrotask(()=>{this.#o=!1,this.isConnected&&this.#c()}))}projectAttributes(t,n){let i=super.projectAttributes(t,n),{selected:a,selectedPage:s}=this.parameters;if(a!=null&&(!Number.isInteger(a)||a<0))throw new TypeError("selected must be a nonnegative index or null");if(s!=null&&typeof s!="string")throw new TypeError("selectedPage must be a string or null");return this.scheduleSelection(),i}#c(){let t=[],n=new Set;for(let d of this.children){let f=Hn.#e.get(d);if(!f)continue;if(f.pageName!=null&&n.has(f.pageName))throw new Error(`Duplicate pageName: ${f.pageName}`);n.add(f.pageName);let p=this.#t.get(d);if(!p){let h=this.ownerDocument.createElement("div");h.className="panel",h.hidden=!0,h.id=f.slot,h.setAttribute("role","group");let m=this.ownerDocument.createElement("slot");m.name=f.slot,h.append(m),this.panelArea.append(h),p={child:d,viewport:h,config:f,index:t.length},this.#t.set(d,p)}p.config=f,p.surface&&(!f.detachable||f.hidden||f.disabled?this.reattachPanel(p,!1):p.surface.configure({...p.surface.parameters,title:f.title||f.pageName||"Panel"})),t.push(p)}let i=this.#a?.index??0;for(let[d,f]of this.#t)t.includes(f)||(this.reattachPanel(f,!1),f.viewport.remove(),this.#t.delete(d));t.forEach((d,f)=>{d.index=f}),this.#t=new Map(t.map(d=>[d.child,d]));let{selectedPage:a,selected:s}=this.parameters,o=!Object.is(a,this.#r.selectedPage),l=!Object.is(s,this.#r.selected);this.#r={selectedPage:a,selected:s};let u=d=>d&&!d.surface&&!d.config.hidden&&!d.config.disabled,c=this.#a;if(!this.#i||o||l){let d=o||!this.#i&&a!=null?t.find(f=>f.config.pageName===a):t[s];u(d)&&(c=d)}(!t.includes(c)||!u(c))&&(c=t.slice(i).find(u)??t.slice(0,i).reverse().find(u)??null),this.renderTabs(t,c),(t.length||this.#i)&&this.#d(c)}renderTabs(){}selectPanel(t){if(!(t.config.hidden||t.config.disabled)){if(t.surface){t.surface.focus();return}this.#d(t)}}#f(t,n){let i=t.config.pageName??t.index;return{page:i,index:t.index,selected:n,change:`${i}_${n?"show":"hide"}`}}#u(t){this.#s.writeParameter("selectedPage",t?.config.pageName??null),this.#s.writeParameter("selected",t?.index??null)}#d(t){let n=this.#a,i=!this.#i;if(!i&&t===n){this.#u(t);return}i||(n&&this.#s.publish("hiding",{pageName:n.config.pageName,index:n.index}),t&&this.#s.publish("showing",{pageName:t.config.pageName,index:t.index})),this.#a=t,this.#i=!0;for(let a of this.#t.values())a.viewport.hidden=!a.surface&&a!==t;this.renderTabs([...this.#t.values()],t),this.#u(t),!i&&n&&this.#s.publish("selected",this.#f(n,!1)),t&&this.#s.publish("selected",this.#f(t,!0))}detachPanel(t,n=null){if(!t.config.detachable||t.config.hidden||t.config.disabled)return;if(t.surface){t.surface.focus();return}let i=this.ownerDocument,a=i.createElement("div");this.shadowRoot.append(a);let s=new pt(this,a,{modal:!1,validateContent:()=>{if(t.viewport.parentNode!==s.body)throw new Error("Detached panel lost its presentation")}});t.surface=s,t.mount=a,s.body.replaceChildren(t.viewport),t.viewport.style.cssText="flex:1;min-width:0;height:100%;",t.viewport.hidden=!1,s.setSourceContext({writeParameter:(l,u)=>{s.parameters[l]=u},publish:l=>{l==="closed"&&this.reattachPanel(t,!0)},callLogic:(l,u)=>this.#s.callLogic(l,u)});let o=this.getBoundingClientRect();s.configure({title:t.config.title||t.config.pageName||"Panel",open:!0,movable:!0,resizable:!0,collapsible:!1,maximizable:!1,maximized:!1,collapsed:!1,closable:!0,beforeClose:null,width:`${Math.max(320,Math.min(o.width,720))}px`,height:`${Math.max(240,Math.min(o.height,560))}px`,left:n?`${n.left}px`:null,top:n?`${n.top}px`:null,minWidth:"220px",minHeight:"140px"}),s.connect(),t===this.#a?this.#d([...this.#t.values()].find(l=>l!==t&&!l.surface&&!l.config.hidden&&!l.config.disabled)??null):this.renderTabs([...this.#t.values()],this.#a)}reattachPanel(t,n=!0){if(!t.surface)return;let i=t.surface;t.surface=null,this.panelArea.append(t.viewport),t.viewport.style.cssText="",i.disconnect(),t.mount.remove(),t.mount=null,t.viewport.hidden=t!==this.#a,n&&t.child.isConnected&&(this.#d(t),this.tabStrip.querySelector(`#tab-${t.config.slot}`).focus())}closePanel(t){if(!t.config.closable)return;let n=t.config.allowClose();if(typeof n!="boolean")throw new TypeError("onClose must return a synchronous boolean");if(!n)return;let i={pageName:t.config.pageName,index:t.index,wasSelected:t===this.#a};this.#s.publish("closing",i),t.config.remove(),this.#c(),this.#s.publish("closed",i)}}}ca.parameters={selectedPage:{dtype:"T",default:null,nullable:!0,binding:"twoWay"},selected:{dtype:"L",default:null,nullable:!0,binding:"twoWay"}};var ua={pageName:{dtype:"T",nullable:!0,unique:!0},title:{dtype:"T",default:""},onClose:{inline:[]}},rl=(0,q.defineComponent)({name:"stackContainer",tag:"gramlot-stack-container",base:ca,subTags:"*",sourceContext:!0,childParameters:ua,implementation:r=>class extends r{}}),nl=(0,q.defineComponent)({name:"tabContainer",tag:"gramlot-tab-container",base:ca,subTags:"*",sourceContext:!0,childParameters:{...ua,title:{...ua.title,required:!0},detachable:{dtype:"B"}},parameters:{tabMode:{dtype:"T",default:"tabs",binding:"read",enum:["tabs","underline"]},tabPosition:{dtype:"T",default:"top",binding:"read",enum:["top","bottom","left","right"]},tabAlign:{dtype:"T",default:"start",binding:"read",enum:["start","center","end"]}},implementation:r=>class extends r{#e=new Map;constructor(){super();let e=this.ownerDocument;this.tabStrip=e.createElement("div"),this.tabStrip.className="tabs",this.tabStrip.setAttribute("role","tablist"),this.control.prepend(this.tabStrip);let t=e.createElement("style");t.textContent=`
|
|
162
166
|
.selection{min-width:0;--tab-border:var(--gramlot-tab-border,var(--gramlot-border,#aaa));
|
|
163
167
|
--tab-radius:var(--gramlot-tab-radius,4px);--tab-indicator:var(--gramlot-tab-indicator-color,var(--gramlot-action,#3766b5))}
|
|
164
168
|
.panels{background:var(--gramlot-tab-selected-background,var(--gramlot-surface,white))}
|
|
@@ -215,11 +219,11 @@ ${" ".repeat(a)}</${s}>`:`<${s}${l}>${f}</${s}>`:t===null||t.includes(s)?`<${s}
|
|
|
215
219
|
[data-mode=underline][data-position=bottom] .tab-entry::after{top:0;bottom:auto}
|
|
216
220
|
[data-mode=underline]:is([data-position=left],[data-position=right]) .tab-entry::after{height:auto;width:var(--gramlot-tab-indicator-size,2px);top:0;bottom:0}
|
|
217
221
|
[data-mode=underline][data-position=left] .tab-entry::after{left:auto;right:0}
|
|
218
|
-
[data-mode=underline][data-position=right] .tab-entry::after{left:0;right:auto}`,this.shadowRoot.append(t)}projectAttributes(e,t){let n=super.projectAttributes(e,t),{tabMode:a,tabPosition:i,tabAlign:s}=this.parameters;if(!["tabs","underline"].includes(a))throw new TypeError("Invalid tabMode");if(!["top","bottom","left","right"].includes(i))throw new TypeError("Invalid tabPosition");if(!["start","center","end"].includes(s))throw new TypeError("Invalid tabAlign");return this.control.dataset.mode=a,this.control.dataset.position=i,this.control.dataset.align=s,this.tabStrip.setAttribute("aria-orientation",["left","right"].includes(i)?"vertical":"horizontal"),n}renderTabs(e,t){for(let[n,a]of this.#e)e.includes(n)||(a.root.remove(),this.#e.delete(n));for(let[n,a]of e.entries()){let i=this.#e.get(a);if(!i){let o=this.ownerDocument,l=o.createElement("div"),u=o.createElement("button"),c=o.createElement("button");l.className="tab-entry",u.type=c.type="button",u.setAttribute("role","tab"),u.id=`tab-${a.config.slot}`,u.setAttribute("aria-controls",a.viewport.id),a.viewport.setAttribute("role","tabpanel"),a.viewport.setAttribute("aria-labelledby",u.id);let d=o.createElement("span"),f=o.createElement("span"),p=o.createElement("span");d.className="icon",d.setAttribute("aria-hidden","true"),f.className="caption",p.className="badge",u.append(d,f,p),c.className="close",c.textContent="\xD7",u.addEventListener("click",()=>this.selectPanel(a)),c.addEventListener("click",()=>{this.closePanel(a),c.isConnected||this.tabStrip.querySelector("[aria-selected=true]")?.focus()}),u.addEventListener("keydown",w=>{if(w.key==="Delete"){w.preventDefault(),this.closePanel(a),this.tabStrip.querySelector("[aria-selected=true]")?.focus();return}let D=["left","right"].includes(this.parameters.tabPosition),A=D?"ArrowUp":"ArrowLeft",$=D?"ArrowDown":"ArrowRight";if(![A,$,"Home","End"].includes(w.key))return;w.preventDefault();let R=[...this.#e].filter(([V])=>!V.config.hidden&&!V.config.disabled).sort(([V],[te])=>V.index-te.index),z=R.findIndex(([V])=>V===a);z=w.key==="Home"?0:w.key==="End"?R.length-1:(z+(w.key===$?1:-1)+R.length)%R.length;let[me,M]=R[z];this.selectPanel(me),M.button.focus(),M.button.scrollIntoView({block:"nearest",inline:"nearest"})});let h=o.createElement("button");h.type="button",h.className="detach";let m=o.createElementNS(oe,"svg");m.setAttribute("viewBox","0 0 20 20"),m.setAttribute("aria-hidden","true");let g=o.createElementNS(oe,"path");g.setAttribute("d","M11 3h6v6M17 3l-8 8M8 4H4v12h12v-4"),g.setAttribute("fill","none"),g.setAttribute("stroke","currentColor"),g.setAttribute("stroke-width","1.8"),g.setAttribute("stroke-linecap","round"),g.setAttribute("stroke-linejoin","round"),m.append(g),h.append(m);let b=null,y=!1;h.addEventListener("pointerdown",w=>{w.button===0&&(b={id:w.pointerId,x:w.clientX,y:w.clientY},y=!1,h.setPointerCapture(w.pointerId),h.setAttribute("data-dragging",""))}),h.addEventListener("pointerup",w=>{if(!b||b.id!==w.pointerId)return;let D=b;b=null,h.removeAttribute("data-dragging"),h.hasPointerCapture(w.pointerId)&&h.releasePointerCapture(w.pointerId),y=Math.hypot(w.clientX-D.x,w.clientY-D.y)>=8,y&&this.detachPanel(a,{left:w.clientX-12,top:w.clientY-12})});for(let w of["pointercancel","lostpointercapture"])h.addEventListener(w,()=>{b=null,h.removeAttribute("data-dragging")});h.addEventListener("click",()=>{if(y){y=!1;return}this.detachPanel(a)});let v=o.createElement("div");v.className="panel-tools",v.append(h),a.viewport.prepend(v),l.append(u,c),this.tabStrip.append(l),i={root:l,button:u,close:c,icon:d,caption:f,badge:p,detach:h,tools:v},this.#e.set(a,i)}this.tabStrip.children[n]!==i.root&&this.tabStrip.insertBefore(i.root,this.tabStrip.children[n]??null),i.root.hidden=!!a.config.hidden;let s=a.config.title||a.config.pageName||String(a.index+1);i.caption.textContent=s,i.button.title=s,i.icon.textContent=a.config.icon,i.badge.textContent=a.config.badge??"",i.badge.hidden=a.config.badge==null||a.config.badge==="",i.badge.style.backgroundColor=a.config.badge_color,i.button.setAttribute("aria-label",i.badge.hidden?s:`${s} ${a.config.badge}`),i.button.disabled=!!a.config.disabled,i.button.setAttribute("aria-selected",String(a===t)),i.button.tabIndex=a===t?0:-1,i.tools.hidden=!a.config.detachable||a!==t||!!a.surface,i.detach.disabled=!!a.config.disabled,i.detach.setAttribute("aria-label",`Detach ${s}`),i.detach.title=`Drag or click to detach ${s}`,i.close.hidden=!a.config.closable,i.close.disabled=!!a.config.disabled,i.close.setAttribute("aria-label",`Close ${s}`)}}}});function Wn(r,e,{align:t="start",matchWidth:n=!1,inset:a=0,placement:i="bottom",point:s=null}={}){let o=e.ownerDocument.defaultView,l=s?{left:s.x,right:s.x,top:s.y,bottom:s.y,width:0}:e.getBoundingClientRect(),u=Math.max(0,o.innerWidth-16);r.style.setProperty("--gramlot-popup-available-width",`${u}px`),n&&(r.style.width=`${Math.min(Math.max(0,l.width-2*a),u)}px`),r.style.removeProperty("--gramlot-popup-available-height");let c=r.getBoundingClientRect();if(i==="side"){let b=Math.max(0,o.innerWidth-8-l.right-3),y=Math.max(0,l.left-8-3),v=c.width>b&&y>b;r.style.setProperty("--gramlot-popup-available-width",`${v?y:b}px`),r.style.setProperty("--gramlot-popup-available-height",`${Math.max(0,o.innerHeight-16)}px`);let w=r.getBoundingClientRect(),D=v?l.left-w.width-3:l.right+3;r.style.left=`${Math.max(8,Math.min(D,o.innerWidth-w.width-8))}px`,r.style.top=`${Math.max(8,Math.min(l.top,o.innerHeight-w.height-8))}px`;return}let d=Math.max(0,o.innerHeight-8-l.bottom-3),f=Math.max(0,l.top-8-3),p=c.height>d&&f>d;r.style.setProperty("--gramlot-popup-available-height",`${p?f:d}px`);let h=r.getBoundingClientRect(),m=t==="end"?l.right-h.width-a:l.left+a,g=p?l.top-h.height-3:l.bottom+3;r.style.left=`${Math.max(8,Math.min(m,o.innerWidth-h.width-8))}px`,r.style.top=`${Math.max(8,Math.min(g,o.innerHeight-h.height-8))}px`}var Gn=class{#e=new Set;#n;#t;constructor(e){this.formlet=e,this.window=e.ownerDocument.defaultView,this.slot=e.control.querySelector("slot")}connect(){this.#n=new this.window.ResizeObserver(this.schedule),this.#n.observe(this.formlet.control),this.slot.addEventListener("slotchange",this.schedule),this.formlet.addEventListener("gramlot-label-layout",this.schedule),this.formlet.ownerDocument.fonts.addEventListener("loadingdone",this.schedule),this.schedule()}disconnect(){this.#n.disconnect(),this.window.cancelAnimationFrame(this.#t),this.#t=void 0,this.slot.removeEventListener("slotchange",this.schedule),this.formlet.removeEventListener("gramlot-label-layout",this.schedule),this.formlet.ownerDocument.fonts.removeEventListener("loadingdone",this.schedule);for(let e of this.#e)this.#i(e);this.#e.clear()}schedule=()=>{!this.formlet.isConnected||this.#t!==void 0||(this.#t=this.window.requestAnimationFrame(()=>{this.#t=void 0,this.#a()}))};#i(e){delete e.box.dataset.formletAligned,e.box.style.removeProperty("--gramlot-formlet-label-width")}#a(){let e=new Set(this.slot.assignedElements().filter(n=>n.labelbox&&n.labelbox.box.dataset.position==="L").map(n=>n.labelbox));for(let n of this.#e)e.has(n)||(this.#n.unobserve(n.fieldLabel),this.#i(n));for(let n of e)n.box.dataset.formletAligned="",this.#e.has(n)||this.#n.observe(n.fieldLabel);this.#e=e;let t=new Map;for(let n of e){if(!n.box.getClientRects().length)continue;let a=n.box.getBoundingClientRect(),i=n.labelBox.getBoundingClientRect(),s=this.window.getComputedStyle(n.labelBox),o=this.window.getComputedStyle(n.box),l=parseFloat(o.columnGap)||0,c=(n.labelBox.hidden?n.box.getBoundingClientRect().left+parseFloat(o.paddingLeft)+parseFloat(o.borderLeftWidth):i.left)-a.left+l,d=n.box.style.getPropertyValue("--gramlot-label-width")?i.width:n.fieldLabel.getBoundingClientRect().width+parseFloat(s.paddingLeft)+parseFloat(s.paddingRight)+parseFloat(s.borderLeftWidth)+parseFloat(s.borderRightWidth),f=t.get(a.left)??[];f.push({field:n,inset:c,width:d}),t.set(a.left,f)}for(let n of t.values()){let a=Math.max(...n.map(({inset:i,width:s})=>i+s));for(let{field:i,inset:s}of n)i.box.style.setProperty("--gramlot-formlet-label-width",`${a-s}px`)}}};function ui(r){return class extends r{constructor(){super();let e=this.attachShadow({mode:"open"}),t=this.ownerDocument.createElement("style");t.textContent=":host{display:contents;font:inherit;color:var(--gramlot-ink,CanvasText)}";let n=this.ownerDocument.createElement("div");e.append(t,n),this.surface=new pt(this,n,{modal:this.constructor.gramlotComponent.name==="dialog",validateContent:()=>{if(this.children.length!==1||bi(this.firstElementChild).localName!=="gramlot-frame-pane")throw new TypeError("A window requires exactly one framePane child")}})}get shell(){return this.surface.shell}get titlebar(){return this.surface.titlebar}get heading(){return this.surface.heading}get body(){return this.surface.body}get status(){return this.surface.status}get closeButton(){return this.surface.closeButton}get collapseButton(){return this.surface.collapseButton}get maximizeButton(){return this.surface.maximizeButton}get resizeButton(){return this.surface.resizeButton}get modal(){return this.surface.modal}get opened(){return this.surface.opened}setSourceContext(e){this.surface.setSourceContext(e)}connectedCallback(){this.surface.connect()}disconnectedCallback(){this.surface.disconnect()}projectAttributes(e){let t=Gr(this,e);return this.surface.configure(this.parameters),t}requestClose(e){return this.surface.requestClose(e)}}}var Be=(r,e="read")=>({dtype:"B",default:r,binding:e});ui.parameters={title:{dtype:"T",default:"",binding:"read"},open:Be(!1,"twoWay"),collapsed:Be(!1,"twoWay"),closable:Be(!0),movable:Be(!1),resizable:Be(!1),collapsible:Be(!1),maximizable:Be(!1),maximized:Be(!1,"twoWay"),beforeClose:{dtype:"T",nullable:!0},...Object.fromEntries(["width","height","left","top"].map(r=>[r,{dtype:"T",nullable:!0,binding:"twoWay"}])),...Object.fromEntries(["minWidth","minHeight"].map(r=>[r,{dtype:"T",nullable:!0,binding:"read"}]))};var rl=(0,H.defineComponent)({name:"dialog",tag:"gramlot-dialog",base:ui,sourceContext:!0,subTags:"framePane",implementation:r=>class extends r{}}),nl=(0,H.defineComponent)({name:"floatingPane",tag:"gramlot-floating-pane",base:ui,sourceContext:!0,subTags:"framePane",parameters:{movable:Be(!0),resizable:Be(!0),collapsible:Be(!0)},implementation:r=>class extends r{}});import{Bag as di}from"@gramlot/gramlot";var al=r=>r*Math.PI/180,Qf=(r,e)=>r.x*e.x+r.y*e.y,Nt=r=>{let e=al(r.rotation??0);return[{x:Math.cos(e),y:Math.sin(e)},{x:-Math.sin(e),y:Math.cos(e)}]};function je(r){let[e,t]=Nt(r),n=r.scale??1,a=r.left+r.width/2,i=r.top+r.height/2;return[[-1,-1],[1,-1],[1,1],[-1,1]].map(([s,o])=>({x:a+n*(e.x*s*r.width+t.x*o*r.height)/2,y:i+n*(e.y*s*r.width+t.y*o*r.height)/2}))}function Ct(r,e){let t=r.map(n=>Qf(n,e));return[Math.min(...t),Math.max(...t)]}function il(r,e){let t=je(r),n=je(e);return[...Nt(r),...Nt(e)].every(a=>{let[i,s]=Ct(t,a),[o,l]=Ct(n,a);return s>o+1e-7&&l>i+1e-7})}function ci(r,e,t){return Object.fromEntries(Object.keys(r).map(n=>[n,r[n]+(e[n]-r[n])*t]))}function ep(r,e,t,n){let a=je(r),i=je(e),s=1;for(let o of t){let l=0,u=1,c=je(o);for(let d of[...Nt(r),...Nt(o)]){let[f,p]=Ct(a,d),[h,m]=Ct(i,d),[g,b]=Ct(c,d);for(let[y,v]of[[p-g,m-g],[b-f,b-h]]){let w=v-y;Math.abs(w)<1e-12?y<=1e-7&&(u=0):w>0?l=Math.max(l,-y/w):u=Math.min(u,-y/w)}}l<u&&u>0&&l<1&&(s=Math.min(s,Math.max(0,l)))}if(n)for(let o=0;o<4;o++)for(let[l,u]of[["x",n.width],["y",n.height]]){let c=a[o][l],d=i[o][l];d<0&&d<c&&(s=Math.min(s,Math.max(0,c/(c-d)))),d>u&&d>c&&(s=Math.min(s,Math.max(0,(u-c)/(d-c))))}return s}function jr(r,e,t,n){let a={...r,rotation:r.rotation??0,scale:r.scale??1},i={...e,rotation:e.rotation??0,scale:e.scale??1},s=i.rotation-a.rotation;if(Math.abs(s)>360&&["left","top","width","height","scale"].every(b=>a[b]===i[b])){let b=jr(a,{...i,rotation:a.rotation+Math.sign(s)*360},t,n);return b===1?1:b*360/Math.abs(s)}let o=Math.abs(al(i.rotation-a.rotation)),l=Math.abs(i.scale-a.scale),u=Math.hypot(i.width-a.width,i.height-a.height)/2,c=Math.max(Math.hypot(a.width,a.height),Math.hypot(i.width,i.height))/2,d=Math.max(a.scale,i.scale),f=2*l*u+2*o*(l*c+d*u)+o*o*d*c;if(f===0)return ep(a,i,t,n);let p=t.map(b=>({points:je(b),axes:Nt(b)}));function h(b,y){let v=je(ci(a,i,b)),w=je(ci(a,i,y)),D=[...v,...w],A=f*(y-b)**2/8;if(n&&D.some(R=>R.x-A<-1e-7||R.y-A<-1e-7||R.x+A>n.width+1e-7||R.y+A>n.height+1e-7))return!1;let $=Nt(ci(a,i,(b+y)/2));return p.every(R=>[...$,...R.axes].some(z=>{let[me,M]=Ct(D,z),[V,te]=Ct(R.points,z);return M+A<=V+1e-7||me-A>=te-1e-7}))}let m=Math.hypot(i.left-a.left+(i.width-a.width)/2,i.top-a.top+(i.height-a.height)/2)+l*c+d*u+o*d*c;function g(b,y){if(h(b,y))return y;if(m*(y-b)<=1e-7||y-b<Number.EPSILON*4)return b;let v=(b+y)/2,w=g(b,v);return w<v?w:g(v,y)}return g(0,1)}function sl(r){let e=r.ownerDocument,t={};for(let[o,l,u,c,d]of[["layer","Layer",-10,10,"M3 8 12 3l9 5-9 5-9-5Zm0 5 9 5 9-5M3 18l9 5 9-5"],["scale","Zoom (%)",10,200,"M16 16l5 5M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0ZM6 10h8M10 6v8"]]){let f=e.createElement("button");f.type="button",f.className="tray-settings-button",f.dataset.kind=o,f.setAttribute("aria-haspopup","dialog"),f.setAttribute("aria-expanded","false");let p=e.createElementNS(oe,"svg"),h=e.createElementNS(oe,"path");p.setAttribute("viewBox","0 0 24 26"),p.setAttribute("aria-hidden","true"),h.setAttribute("d",d),h.setAttribute("fill","none"),h.setAttribute("stroke","currentColor"),h.setAttribute("stroke-width","1.5"),h.setAttribute("stroke-linecap","round"),h.setAttribute("stroke-linejoin","round"),p.append(h),f.append(p),r.labelbox.labelBox.append(f);let m=e.createElement("div");m.className="tray-settings-popup",m.setAttribute("popover","auto"),m.setAttribute("role","dialog");let g=e.createElement("style");g.textContent=`.tray-settings-popup{position:fixed;inset:auto;margin:0;padding:10px;min-width:64px;box-sizing:border-box;border:1px solid var(--gramlot-border-control,#b9c2ce);border-radius:7px;background:var(--gramlot-surface,#fff);color:var(--gramlot-ink,#203149);box-shadow:0 4px 14px #0002;font:12px system-ui;max-height:var(--gramlot-popup-available-height,90vh);overflow:auto}
|
|
222
|
+
[data-mode=underline][data-position=right] .tab-entry::after{left:0;right:auto}`,this.shadowRoot.append(t)}projectAttributes(e,t){let n=super.projectAttributes(e,t),{tabMode:i,tabPosition:a,tabAlign:s}=this.parameters;if(!["tabs","underline"].includes(i))throw new TypeError("Invalid tabMode");if(!["top","bottom","left","right"].includes(a))throw new TypeError("Invalid tabPosition");if(!["start","center","end"].includes(s))throw new TypeError("Invalid tabAlign");return this.control.dataset.mode=i,this.control.dataset.position=a,this.control.dataset.align=s,this.tabStrip.setAttribute("aria-orientation",["left","right"].includes(a)?"vertical":"horizontal"),n}renderTabs(e,t){for(let[n,i]of this.#e)e.includes(n)||(i.root.remove(),this.#e.delete(n));for(let[n,i]of e.entries()){let a=this.#e.get(i);if(!a){let o=this.ownerDocument,l=o.createElement("div"),u=o.createElement("button"),c=o.createElement("button");l.className="tab-entry",u.type=c.type="button",u.setAttribute("role","tab"),u.id=`tab-${i.config.slot}`,u.setAttribute("aria-controls",i.viewport.id),i.viewport.setAttribute("role","tabpanel"),i.viewport.setAttribute("aria-labelledby",u.id);let d=o.createElement("span"),f=o.createElement("span"),p=o.createElement("span");d.className="icon",d.setAttribute("aria-hidden","true"),f.className="caption",p.className="badge",u.append(d,f,p),c.className="close",c.textContent="\xD7",u.addEventListener("click",()=>this.selectPanel(i)),c.addEventListener("click",()=>{this.closePanel(i),c.isConnected||this.tabStrip.querySelector("[aria-selected=true]")?.focus()}),u.addEventListener("keydown",w=>{if(w.key==="Delete"){w.preventDefault(),this.closePanel(i),this.tabStrip.querySelector("[aria-selected=true]")?.focus();return}let D=["left","right"].includes(this.parameters.tabPosition),A=D?"ArrowUp":"ArrowLeft",$=D?"ArrowDown":"ArrowRight";if(![A,$,"Home","End"].includes(w.key))return;w.preventDefault();let R=[...this.#e].filter(([H])=>!H.config.hidden&&!H.config.disabled).sort(([H],[te])=>H.index-te.index),V=R.findIndex(([H])=>H===i);V=w.key==="Home"?0:w.key==="End"?R.length-1:(V+(w.key===$?1:-1)+R.length)%R.length;let[me,M]=R[V];this.selectPanel(me),M.button.focus(),M.button.scrollIntoView({block:"nearest",inline:"nearest"})});let h=o.createElement("button");h.type="button",h.className="detach";let m=o.createElementNS(oe,"svg");m.setAttribute("viewBox","0 0 20 20"),m.setAttribute("aria-hidden","true");let g=o.createElementNS(oe,"path");g.setAttribute("d","M11 3h6v6M17 3l-8 8M8 4H4v12h12v-4"),g.setAttribute("fill","none"),g.setAttribute("stroke","currentColor"),g.setAttribute("stroke-width","1.8"),g.setAttribute("stroke-linecap","round"),g.setAttribute("stroke-linejoin","round"),m.append(g),h.append(m);let b=null,y=!1;h.addEventListener("pointerdown",w=>{w.button===0&&(b={id:w.pointerId,x:w.clientX,y:w.clientY},y=!1,h.setPointerCapture(w.pointerId),h.setAttribute("data-dragging",""))}),h.addEventListener("pointerup",w=>{if(!b||b.id!==w.pointerId)return;let D=b;b=null,h.removeAttribute("data-dragging"),h.hasPointerCapture(w.pointerId)&&h.releasePointerCapture(w.pointerId),y=Math.hypot(w.clientX-D.x,w.clientY-D.y)>=8,y&&this.detachPanel(i,{left:w.clientX-12,top:w.clientY-12})});for(let w of["pointercancel","lostpointercapture"])h.addEventListener(w,()=>{b=null,h.removeAttribute("data-dragging")});h.addEventListener("click",()=>{if(y){y=!1;return}this.detachPanel(i)});let v=o.createElement("div");v.className="panel-tools",v.append(h),i.viewport.prepend(v),l.append(u,c),this.tabStrip.append(l),a={root:l,button:u,close:c,icon:d,caption:f,badge:p,detach:h,tools:v},this.#e.set(i,a)}this.tabStrip.children[n]!==a.root&&this.tabStrip.insertBefore(a.root,this.tabStrip.children[n]??null),a.root.hidden=!!i.config.hidden;let s=i.config.title||i.config.pageName||String(i.index+1);a.caption.textContent=s,a.button.title=s,a.icon.textContent=i.config.icon,a.badge.textContent=i.config.badge??"",a.badge.hidden=i.config.badge==null||i.config.badge==="",a.badge.style.backgroundColor=i.config.badge_color,a.button.setAttribute("aria-label",a.badge.hidden?s:`${s} ${i.config.badge}`),a.button.disabled=!!i.config.disabled,a.button.setAttribute("aria-selected",String(i===t)),a.button.tabIndex=i===t?0:-1,a.tools.hidden=!i.config.detachable||i!==t||!!i.surface,a.detach.disabled=!!i.config.disabled,a.detach.setAttribute("aria-label",`Detach ${s}`),a.detach.title=`Drag or click to detach ${s}`,a.close.hidden=!i.config.closable,a.close.disabled=!!i.config.disabled,a.close.setAttribute("aria-label",`Close ${s}`)}}}});function Wn(r,e,{align:t="start",matchWidth:n=!1,inset:i=0,placement:a="bottom",point:s=null}={}){let o=e.ownerDocument.defaultView,l=s?{left:s.x,right:s.x,top:s.y,bottom:s.y,width:0}:e.getBoundingClientRect(),u=Math.max(0,o.innerWidth-16);r.style.setProperty("--gramlot-popup-available-width",`${u}px`),n&&(r.style.width=`${Math.min(Math.max(0,l.width-2*i),u)}px`),r.style.removeProperty("--gramlot-popup-available-height");let c=r.getBoundingClientRect();if(a==="side"){let b=Math.max(0,o.innerWidth-8-l.right-3),y=Math.max(0,l.left-8-3),v=c.width>b&&y>b;r.style.setProperty("--gramlot-popup-available-width",`${v?y:b}px`),r.style.setProperty("--gramlot-popup-available-height",`${Math.max(0,o.innerHeight-16)}px`);let w=r.getBoundingClientRect(),D=v?l.left-w.width-3:l.right+3;r.style.left=`${Math.max(8,Math.min(D,o.innerWidth-w.width-8))}px`,r.style.top=`${Math.max(8,Math.min(l.top,o.innerHeight-w.height-8))}px`;return}let d=Math.max(0,o.innerHeight-8-l.bottom-3),f=Math.max(0,l.top-8-3),p=c.height>d&&f>d;r.style.setProperty("--gramlot-popup-available-height",`${p?f:d}px`);let h=r.getBoundingClientRect(),m=t==="end"?l.right-h.width-i:l.left+i,g=p?l.top-h.height-3:l.bottom+3;r.style.left=`${Math.max(8,Math.min(m,o.innerWidth-h.width-8))}px`,r.style.top=`${Math.max(8,Math.min(g,o.innerHeight-h.height-8))}px`}var Gn=class{#e=new Set;#n;#t;constructor(e){this.formlet=e,this.window=e.ownerDocument.defaultView,this.slot=e.control.querySelector("slot")}connect(){this.#n=new this.window.ResizeObserver(this.schedule),this.#n.observe(this.formlet.control),this.slot.addEventListener("slotchange",this.schedule),this.formlet.addEventListener("gramlot-label-layout",this.schedule),this.formlet.ownerDocument.fonts.addEventListener("loadingdone",this.schedule),this.schedule()}disconnect(){this.#n.disconnect(),this.window.cancelAnimationFrame(this.#t),this.#t=void 0,this.slot.removeEventListener("slotchange",this.schedule),this.formlet.removeEventListener("gramlot-label-layout",this.schedule),this.formlet.ownerDocument.fonts.removeEventListener("loadingdone",this.schedule);for(let e of this.#e)this.#a(e);this.#e.clear()}schedule=()=>{!this.formlet.isConnected||this.#t!==void 0||(this.#t=this.window.requestAnimationFrame(()=>{this.#t=void 0,this.#i()}))};#a(e){delete e.box.dataset.formletAligned,e.box.style.removeProperty("--gramlot-formlet-label-width")}#i(){let e=new Set(this.slot.assignedElements().filter(n=>n.labelbox&&n.labelbox.box.dataset.position==="L").map(n=>n.labelbox));for(let n of this.#e)e.has(n)||(this.#n.unobserve(n.fieldLabel),this.#a(n));for(let n of e)n.box.dataset.formletAligned="",this.#e.has(n)||this.#n.observe(n.fieldLabel);this.#e=e;let t=new Map;for(let n of e){if(!n.box.getClientRects().length)continue;let i=n.box.getBoundingClientRect(),a=n.labelBox.getBoundingClientRect(),s=this.window.getComputedStyle(n.labelBox),o=this.window.getComputedStyle(n.box),l=parseFloat(o.columnGap)||0,c=(n.labelBox.hidden?n.box.getBoundingClientRect().left+parseFloat(o.paddingLeft)+parseFloat(o.borderLeftWidth):a.left)-i.left+l,d=n.box.style.getPropertyValue("--gramlot-label-width")?a.width:n.fieldLabel.getBoundingClientRect().width+parseFloat(s.paddingLeft)+parseFloat(s.paddingRight)+parseFloat(s.borderLeftWidth)+parseFloat(s.borderRightWidth),f=t.get(i.left)??[];f.push({field:n,inset:c,width:d}),t.set(i.left,f)}for(let n of t.values()){let i=Math.max(...n.map(({inset:a,width:s})=>a+s));for(let{field:a,inset:s}of n)a.box.style.setProperty("--gramlot-formlet-label-width",`${i-s}px`)}}};function da(r){return class extends r{constructor(){super();let e=this.attachShadow({mode:"open"}),t=this.ownerDocument.createElement("style");t.textContent=":host{display:contents;font:inherit;color:var(--gramlot-ink,CanvasText)}";let n=this.ownerDocument.createElement("div");e.append(t,n),this.surface=new pt(this,n,{modal:this.constructor.gramlotComponent.name==="dialog",validateContent:()=>{if(this.children.length!==1||wa(this.firstElementChild).localName!=="gramlot-frame-pane")throw new TypeError("A window requires exactly one framePane child")}})}get shell(){return this.surface.shell}get titlebar(){return this.surface.titlebar}get heading(){return this.surface.heading}get body(){return this.surface.body}get status(){return this.surface.status}get closeButton(){return this.surface.closeButton}get collapseButton(){return this.surface.collapseButton}get maximizeButton(){return this.surface.maximizeButton}get resizeButton(){return this.surface.resizeButton}get modal(){return this.surface.modal}get opened(){return this.surface.opened}setSourceContext(e){this.surface.setSourceContext(e)}connectedCallback(){this.surface.connect()}disconnectedCallback(){this.surface.disconnect()}projectAttributes(e){let t=Gr(this,e);return this.surface.configure(this.parameters),t}requestClose(e){return this.surface.requestClose(e)}}}var Ce=(r,e="read")=>({dtype:"B",default:r,binding:e});da.parameters={title:{dtype:"T",default:"",binding:"read"},open:Ce(!1,"twoWay"),collapsed:Ce(!1,"twoWay"),closable:Ce(!0),movable:Ce(!1),resizable:Ce(!1),collapsible:Ce(!1),maximizable:Ce(!1),maximized:Ce(!1,"twoWay"),beforeClose:{dtype:"T",nullable:!0},...Object.fromEntries(["width","height","left","top"].map(r=>[r,{dtype:"T",nullable:!0,binding:"twoWay"}])),...Object.fromEntries(["minWidth","minHeight"].map(r=>[r,{dtype:"T",nullable:!0,binding:"read"}]))};var il=(0,q.defineComponent)({name:"dialog",tag:"gramlot-dialog",base:da,sourceContext:!0,subTags:"framePane",implementation:r=>class extends r{}}),al=(0,q.defineComponent)({name:"floatingPane",tag:"gramlot-floating-pane",base:da,sourceContext:!0,subTags:"framePane",parameters:{movable:Ce(!0),resizable:Ce(!0),collapsible:Ce(!0),docked:Ce(!1)},implementation:r=>class extends r{}});import{Bag as pa}from"@gramlot/gramlot";var sl=r=>r*Math.PI/180,tp=(r,e)=>r.x*e.x+r.y*e.y,Nt=r=>{let e=sl(r.rotation??0);return[{x:Math.cos(e),y:Math.sin(e)},{x:-Math.sin(e),y:Math.cos(e)}]};function je(r){let[e,t]=Nt(r),n=r.scale??1,i=r.left+r.width/2,a=r.top+r.height/2;return[[-1,-1],[1,-1],[1,1],[-1,1]].map(([s,o])=>({x:i+n*(e.x*s*r.width+t.x*o*r.height)/2,y:a+n*(e.y*s*r.width+t.y*o*r.height)/2}))}function Ct(r,e){let t=r.map(n=>tp(n,e));return[Math.min(...t),Math.max(...t)]}function ol(r,e){let t=je(r),n=je(e);return[...Nt(r),...Nt(e)].every(i=>{let[a,s]=Ct(t,i),[o,l]=Ct(n,i);return s>o+1e-7&&l>a+1e-7})}function fa(r,e,t){return Object.fromEntries(Object.keys(r).map(n=>[n,r[n]+(e[n]-r[n])*t]))}function rp(r,e,t,n){let i=je(r),a=je(e),s=1;for(let o of t){let l=0,u=1,c=je(o);for(let d of[...Nt(r),...Nt(o)]){let[f,p]=Ct(i,d),[h,m]=Ct(a,d),[g,b]=Ct(c,d);for(let[y,v]of[[p-g,m-g],[b-f,b-h]]){let w=v-y;Math.abs(w)<1e-12?y<=1e-7&&(u=0):w>0?l=Math.max(l,-y/w):u=Math.min(u,-y/w)}}l<u&&u>0&&l<1&&(s=Math.min(s,Math.max(0,l)))}if(n)for(let o=0;o<4;o++)for(let[l,u]of[["x",n.width],["y",n.height]]){let c=i[o][l],d=a[o][l];d<0&&d<c&&(s=Math.min(s,Math.max(0,c/(c-d)))),d>u&&d>c&&(s=Math.min(s,Math.max(0,(u-c)/(d-c))))}return s}function zr(r,e,t,n){let i={...r,rotation:r.rotation??0,scale:r.scale??1},a={...e,rotation:e.rotation??0,scale:e.scale??1},s=a.rotation-i.rotation;if(Math.abs(s)>360&&["left","top","width","height","scale"].every(b=>i[b]===a[b])){let b=zr(i,{...a,rotation:i.rotation+Math.sign(s)*360},t,n);return b===1?1:b*360/Math.abs(s)}let o=Math.abs(sl(a.rotation-i.rotation)),l=Math.abs(a.scale-i.scale),u=Math.hypot(a.width-i.width,a.height-i.height)/2,c=Math.max(Math.hypot(i.width,i.height),Math.hypot(a.width,a.height))/2,d=Math.max(i.scale,a.scale),f=2*l*u+2*o*(l*c+d*u)+o*o*d*c;if(f===0)return rp(i,a,t,n);let p=t.map(b=>({points:je(b),axes:Nt(b)}));function h(b,y){let v=je(fa(i,a,b)),w=je(fa(i,a,y)),D=[...v,...w],A=f*(y-b)**2/8;if(n&&D.some(R=>R.x-A<-1e-7||R.y-A<-1e-7||R.x+A>n.width+1e-7||R.y+A>n.height+1e-7))return!1;let $=Nt(fa(i,a,(b+y)/2));return p.every(R=>[...$,...R.axes].some(V=>{let[me,M]=Ct(D,V),[H,te]=Ct(R.points,V);return M+A<=H+1e-7||me-A>=te-1e-7}))}let m=Math.hypot(a.left-i.left+(a.width-i.width)/2,a.top-i.top+(a.height-i.height)/2)+l*c+d*u+o*d*c;function g(b,y){if(h(b,y))return y;if(m*(y-b)<=1e-7||y-b<Number.EPSILON*4)return b;let v=(b+y)/2,w=g(b,v);return w<v?w:g(v,y)}return g(0,1)}function ll(r){let e=r.ownerDocument,t={};for(let[o,l,u,c,d]of[["layer","Layer",-10,10,"M3 8 12 3l9 5-9 5-9-5Zm0 5 9 5 9-5M3 18l9 5 9-5"],["scale","Zoom (%)",10,200,"M16 16l5 5M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0ZM6 10h8M10 6v8"]]){let f=e.createElement("button");f.type="button",f.className="tray-settings-button",f.dataset.kind=o,f.setAttribute("aria-haspopup","dialog"),f.setAttribute("aria-expanded","false");let p=e.createElementNS(oe,"svg"),h=e.createElementNS(oe,"path");p.setAttribute("viewBox","0 0 24 26"),p.setAttribute("aria-hidden","true"),h.setAttribute("d",d),h.setAttribute("fill","none"),h.setAttribute("stroke","currentColor"),h.setAttribute("stroke-width","1.5"),h.setAttribute("stroke-linecap","round"),h.setAttribute("stroke-linejoin","round"),p.append(h),f.append(p),r.labelbox.labelBox.append(f);let m=e.createElement("div");m.className="tray-settings-popup",m.setAttribute("popover","auto"),m.setAttribute("role","dialog");let g=e.createElement("style");g.textContent=`.tray-settings-popup{position:fixed;inset:auto;margin:0;padding:10px;min-width:64px;box-sizing:border-box;border:1px solid var(--gramlot-border-control,#b9c2ce);border-radius:7px;background:var(--gramlot-surface,#fff);color:var(--gramlot-ink,#203149);box-shadow:0 4px 14px #0002;font:12px system-ui;max-height:var(--gramlot-popup-available-height,90vh);overflow:auto}
|
|
219
223
|
.tray-settings-popup:popover-open{display:grid;justify-items:center;gap:7px}
|
|
220
224
|
.tray-settings-popup input{writing-mode:vertical-lr;direction:rtl;width:24px;height:130px;margin:0;touch-action:none;accent-color:var(--gramlot-brand-blue,#3766b5)}
|
|
221
|
-
.tray-settings-popup output{font-weight:600;white-space:nowrap}`;let b=e.createElement("output"),y=e.createElement("span"),v=e.createElement("span");y.textContent=o==="layer"?"+10":"200%",v.textContent=o==="layer"?"\u221210":"10%";let w=e.createElement("input");w.type="range",w.min=String(u),w.max=String(c),w.step="1",w.setAttribute("aria-orientation","vertical"),w.setAttribute("aria-label",l),m.append(g,b,y,w,v),t[o]={button:f,popup:m,input:w,output:b}}function n(o,l,u){for(let[c,{popup:d,input:f,button:p}]of Object.entries(t))f.oninput=()=>{u(c,f.valueAsNumber/(c==="scale"?100:1)),a(l())},d.onbeforetoggle=h=>{h.newState==="closed"&&l().getItem(`settings.${c}Open`)===!0&&l().setItem(`settings.${c}Open`,!1)},d.onkeydown=h=>{h.key==="Escape"&&(l().setItem(`settings.${c}Open`,!1),p.focus(),h.stopPropagation())},d.parentNode!==o.shadowRoot&&o.shadowRoot.append(d)}function a(o){for(let[l,{button:u,popup:c,input:d,output:f}]of Object.entries(t)){let p=o.getItem(l)*(l==="scale"?100:1),h=o.getItem(`settings.${l}Open`)===!0;d.value=String(p),f.value=l==="scale"?`${Math.round(p)}%`:`Layer ${p}`,c.setAttribute("aria-label",u.title),u.setAttribute("aria-expanded",String(h)),h?c.matches(":popover-open")||(c.showPopover(),Wn(c,u,{align:"end"})):c.matches(":popover-open")&&c.hidePopover()}}function i(o,l){let u=o.getItem(`settings.${l}Open`)!==!0;for(let c of Object.keys(t))o.setItem(`settings.${c}Open`,c===l&&u);a(o),u&&t[l].input.focus()}function s(){for(let{popup:o}of Object.values(t))o.remove()}return{controls:t,mount:n,project:a,open:i,remove:s}}var ol=(0,H.defineComponent)({name:"trayPane",tag:"gramlot-tray-pane",base:ve,subTags:"*",bagStore:!0,parameters:{storepath:{dtype:"T"},locked:{dtype:"B",default:!1,binding:"read"},gridStep:{dtype:"L",default:10,binding:"read"},gridVisible:{dtype:"B",default:!1,binding:"read"},rotationStep:{dtype:"N",default:15,binding:"read"}},childParameters:{closable:{dtype:"B",default:!1},minWidth:{dtype:"N",default:100},minHeight:{dtype:"N",default:64}},implementation:r=>class ee extends r{static#e=new WeakMap;static projectChild(t,n,{label:a,remove:i}){if(!t.labelbox)throw new TypeError("trayPane children require a Labelbox (declare lbl)");let{minWidth:s=100,minHeight:o=64,closable:l=!1,...u}=n;if(typeof l!="boolean")throw new TypeError("closable must be a boolean");if(![s,o].every(d=>typeof d=="number"&&Number.isFinite(d)&&d>0))throw new TypeError("trayPane minimum dimensions must be positive numbers");ee.#e.set(t,{label:a,minWidth:s,minHeight:o,closable:l,remove:i}),t.setAttribute("data-tray-block","");let c=t.labelbox.traySettings??=sl(t);for(let[d,{button:f}]of Object.entries(c.controls))f.title=`${d==="layer"?"Layer":"Zoom"} for ${n.lbl??a}`,f.setAttribute("aria-label",f.title);if(!t.labelbox.rotationHandle){let d=t.ownerDocument,f=d.createElement("button");f.type="button",f.className="tray-rotate";let p=d.createElementNS(oe,"svg"),h=d.createElementNS(oe,"path");p.setAttribute("viewBox","0 0 24 24"),p.setAttribute("aria-hidden","true"),h.setAttribute("d","M4 10a8 8 0 1 1 2 8M4 4v6h6"),h.setAttribute("fill","none"),h.setAttribute("stroke","currentColor"),h.setAttribute("stroke-width","1.5"),h.setAttribute("stroke-linecap","round"),h.setAttribute("stroke-linejoin","round"),p.append(h),f.append(p),t.labelbox.labelBox.append(f),t.labelbox.rotationHandle=f}if(t.labelbox.rotationHandle.setAttribute("aria-label",`Rotate ${n.lbl??a}`),t.labelbox.rotationHandle.title="Rotate: drag around the center or use arrow keys",l&&!t.labelbox.closeButton){let d=t.ownerDocument.createElement("button");d.type="button",d.className="tray-close";let f=t.ownerDocument.createElementNS(oe,"svg"),p=t.ownerDocument.createElementNS(oe,"path");f.setAttribute("viewBox","0 0 24 24"),f.setAttribute("aria-hidden","true"),p.setAttribute("d","m6 6 12 12M18 6 6 18"),p.setAttribute("fill","none"),p.setAttribute("stroke","currentColor"),p.setAttribute("stroke-width","1.5"),p.setAttribute("stroke-linecap","round"),f.append(p),d.append(f),t.labelbox.labelBox.append(d),t.labelbox.closeButton=d}if(t.labelbox.closeButton&&(t.labelbox.closeButton.hidden=!l,t.labelbox.closeButton.title=`Remove ${n.lbl??a}`,t.labelbox.closeButton.setAttribute("aria-label",t.labelbox.closeButton.title)),t.toggleAttribute("data-movable",!0),t.toggleAttribute("data-resizable",!0),!t.labelbox.resizeHandle){let d=t.ownerDocument,f=d.createElement("button");f.type="button",f.className="tray-resize";let p=d.createElementNS(oe,"svg"),h=d.createElementNS(oe,"path");p.setAttribute("viewBox","0 0 16 16"),p.setAttribute("aria-hidden","true"),h.setAttribute("d","M5 13 13 5M9 13l4-4"),h.setAttribute("fill","none"),h.setAttribute("stroke","currentColor"),h.setAttribute("stroke-width","1.25"),h.setAttribute("stroke-linecap","round"),p.append(h),f.append(p),t.append(f),t.labelbox.resizeHandle=f}return t.labelbox.resizeHandle&&(t.labelbox.resizeHandle.hidden=!1,t.labelbox.resizeHandle.setAttribute("aria-label",`Resize ${n.lbl??a}`),t.labelbox.resizeHandle.title="Resize: drag or use arrow keys"),t.parentElement instanceof ee&&t.parentElement.#f(),{...u,box_position:"absolute",...u.lbl_variant==null?{lbl_variant:"card"}:{}}}#n;#t=new Set;#i=`tray-${Xr()}`;#a;#o=!1;#r;#l=!1;#s=!1;constructor(){super();let t=this.ownerDocument.createElement("style");t.textContent=':host{display:block;position:relative;isolation:isolate;overflow:hidden;min-height:0}.control-box{display:contents}:host::before{content:"";position:absolute;inset:0;pointer-events:none;z-index:-2147483648;display:var(--tray-grid-display,none);background-image:linear-gradient(to right,color-mix(in srgb,currentColor 13%,transparent) 1px,transparent 1px),linear-gradient(to bottom,color-mix(in srgb,currentColor 13%,transparent) 1px,transparent 1px);background-size:var(--tray-grid-size) var(--tray-grid-size)}',t.textContent+=".tray-marquee{position:absolute;box-sizing:border-box;pointer-events:none;z-index:2147483647;border:1px solid var(--gramlot-brand-blue,#3766b5);background:color-mix(in srgb,var(--gramlot-brand-blue,#3766b5) 12%,transparent)}",this.shadowRoot.append(t)}projectAttributes(t){let n=super.projectAttributes(t);for(let a of["gridStep","rotationStep"]){let i=this.parameters[a];if(typeof i!="number"||!Number.isFinite(i)||i<0||a==="gridStep"&&!Number.isInteger(i))throw new TypeError(`trayPane ${a} must be a nonnegative ${a==="gridStep"?"integer":"number"}`)}return this.style.setProperty("--tray-grid-size",`${this.parameters.gridStep}px`),this.style.setProperty("--tray-grid-display",this.parameters.gridVisible&&this.parameters.gridStep>0?"block":"none"),this.parameters.locked&&this.#m(),this.#f(),n}setStoreBag(t){if(!(t instanceof di))throw new TypeError("trayPane storepath must resolve to a Bag");this.#n!==t&&(this.#m(),this.#n?.unsubscribe(this.#i,{any:!0}),this.#n=t,this.isConnected&&this.#c()),this.#f()}connectedCallback(){this.#n&&this.#c(),this.#a=new this.ownerDocument.defaultView.AbortController;let t={signal:this.#a.signal};this.shadowRoot.querySelector("slot").addEventListener("slotchange",()=>this.#f(),t),this.addEventListener("pointerdown",n=>this.#A(n),t),this.addEventListener("pointermove",n=>this.#_(n),t),this.addEventListener("keydown",n=>this.#D(n),t),this.ownerDocument.addEventListener("keydown",n=>{this.#r?.marquee&&n.key==="Escape"&&(this.#w(),n.preventDefault(),n.stopPropagation())},t),this.addEventListener("pointerup",n=>{n.pointerId===this.#r?.id&&(this.#_(n),this.#r?.pendingSelection&&!this.#r.moved&&this.#E(this.#r.box,this.#r.extend),this.#m())},t),this.addEventListener("pointercancel",n=>{n.pointerId===this.#r?.id&&this.#w()},t),this.addEventListener("lostpointercapture",n=>{n.pointerId===this.#r?.id&&this.#w()},t),this.addEventListener("click",n=>{if(this.#s){this.#s=!1,n.preventDefault(),n.stopPropagation();return}if(this.parameters.locked)return;let a=n.composedPath(),i=a.find(l=>l.parentElement===this);if(!ee.#e.has(i))return;let s=ee.#e.get(i);if(s.closable&&a.includes(i.labelbox.closeButton)){n.preventDefault(),n.stopPropagation(),this.#m(),i.labelbox.traySettings.remove(),this.#t.delete(i.labelbox.traySettings),s.remove(),this.#n.getNode(s.label)&&this.#n.popNode(s.label);return}let o=i.labelbox.traySettings;for(let[l,{button:u}]of Object.entries(o.controls))a.includes(u)&&o.open(this.#u(ee.#e.get(i).label),l)},{...t,capture:!0}),this.#f()}disconnectedCallback(){for(let t of this.#t)t.remove();this.#m(),this.#a.abort(),this.#n?.unsubscribe(this.#i,{any:!0})}#c(){this.#n.subscribe(this.#i,{any:t=>{if(this.#l||((t.node.label!=="selected"||this.#r?.members||this.#r?.marquee)&&this.#m(),!["layer","rotation","scale"].includes(t.node.label)||!["upd_value","upd_value_attr"].includes(t.evt)))return;let n=[...this.children].find(o=>this.#n.getItem([ee.#e.get(o).label])===t.node.parentBag);if(!n)return;let a=t.node.label,i=t.node.value,s=i;if(a==="layer")(!Number.isInteger(i)||this.#p(n,i).some(o=>il(this.#d(n),o)))&&(s=t.oldvalue);else if(typeof i!="number"||!Number.isFinite(i)||a==="scale"&&i<=0)s=t.oldvalue;else{let o=this.#d(n),l={...o,[a]:t.oldvalue},u=jr(l,o,this.#p(n,t.node.parentBag.getItem("layer")),this.#g());s=t.oldvalue+(i-t.oldvalue)*u}if(s!==i){this.#l=!0;try{t.node.setValue(s)}finally{this.#l=!1}}this.#f()}})}#f(){this.#o||(this.#o=!0,queueMicrotask(()=>{if(this.#o=!1,!(!this.isConnected||!this.#n)){for(let t of this.#t)[...this.children].some(n=>n.labelbox.traySettings===t)||(t.remove(),this.#t.delete(t));for(let t of this.children){let n=ee.#e.get(t),a=this.#u(n.label);t.style.left=`${a.getItem("left")}px`,t.style.top=`${a.getItem("top")}px`,t.style.zIndex=String(a.getItem("layer")),t.style.transformOrigin="center",t.style.transform=`rotate(${a.getItem("rotation")}deg) scale(${a.getItem("scale")})`;let i=t.labelbox.traySettings,s=this.parameters.locked;t.toggleAttribute("data-movable",!s);for(let[o,{button:l}]of Object.entries(i.controls))l.hidden=s,s&&a.getItem(`settings.${o}Open`)===!0&&a.setItem(`settings.${o}Open`,!1);if(t.labelbox.rotationHandle.hidden=s,t.labelbox.closeButton&&(t.labelbox.closeButton.hidden=s||!n.closable),t.labelbox.resizeHandle&&(t.labelbox.resizeHandle.hidden=s),i.mount(this,()=>this.#u(n.label),(o,l)=>{this.parameters.locked||this.#u(n.label).setItem(o,l)}),i.project(a),this.#t.add(i),t.toggleAttribute("data-selected",!s&&a.getItem("selected")),a.getNode("width"))t.style.width=`${a.getItem("width")}px`,t.style.height=`${a.getItem("height")}px`;else{let o=this.ownerDocument.createElement("div").style;o.cssText=t.labelbox.previous.box.style??"",t.style.width=o.width,t.style.height=o.height}}}}))}#u(t){let n=this.#n.getNode([t]),a=n?.value;if(n||(a=new di({left:0,top:0,layer:0,selected:!1}),this.#n.setItem([t],a)),!(a instanceof di))throw new TypeError(`trayPane position '${t}' must be a Bag`);a.getNode("selected")||a.setItem("selected",!1);for(let[i,s]of[["rotation",0],["scale",1]])a.getNode(i)||a.setItem(i,s);if(typeof a.getItem("rotation")!="number"||!Number.isFinite(a.getItem("rotation")))throw new TypeError(`trayPane ${t}.rotation must be finite`);if(typeof a.getItem("scale")!="number"||!Number.isFinite(a.getItem("scale"))||a.getItem("scale")<=0)throw new TypeError(`trayPane ${t}.scale must be positive`);if(typeof a.getItem("selected")!="boolean")throw new TypeError(`trayPane ${t}.selected must be boolean`);if(!Number.isInteger(a.getItem("layer")))throw new TypeError(`trayPane ${t}.layer must be an integer`);for(let i of["left","top"]){let s=a.getItem(i);if(typeof s!="number"||!Number.isFinite(s))throw new TypeError(`trayPane ${t}.${i} must be a finite number`)}if(a.getNode("width")||a.getNode("height"))for(let i of["width","height"]){let s=a.getItem(i);if(typeof s!="number"||!Number.isFinite(s)||s<=0)throw new TypeError(`trayPane ${t}.${i} must be a positive number`)}return a}#d(t){let n=this.#u(ee.#e.get(t).label);return{left:n.getItem("left"),top:n.getItem("top"),rotation:n.getItem("rotation"),scale:n.getItem("scale"),width:n.getNode("width")?n.getItem("width"):t.offsetWidth,height:n.getNode("height")?n.getItem("height"):t.offsetHeight}}#p(t,n){return[...this.children].filter(a=>a!==t&&this.#u(ee.#e.get(a).label).getItem("layer")===n).map(a=>this.#d(a))}#g(){return{width:this.clientWidth,height:this.clientHeight}}#y(t,n,a){let i=this.#d(t),s={...i,...a},o=jr(i,s,this.#p(t,n.getItem("layer")),this.#g());return Object.fromEntries(Object.entries(a).map(([l,u])=>[l,i[l]+(u-i[l])*o]))}#A(t){if(this.parameters.locked||t.button!==0||this.#r)return;this.#s=!1;let n=t.composedPath(),a=n.find(p=>p.parentElement===this);if(n.some(p=>p.classList?.contains("tray-settings-popup")&&p.parentNode===this.shadowRoot)||n.find(p=>p instanceof ee)!==this)return;let i=ee.#e.get(a);if(!i){let p=this.getBoundingClientRect(),h=this.ownerDocument.createElement("div");h.className="tray-marquee",h.hidden=!0,h.setAttribute("aria-hidden","true");let m=[...this.children].map(g=>({box:g,row:this.#u(ee.#e.get(g).label),selected:this.#u(ee.#e.get(g).label).getItem("selected")}));this.#r={id:t.pointerId,marquee:m,overlay:h,extend:t.shiftKey,x:t.clientX-p.left-this.clientLeft,y:t.clientY-p.top-this.clientTop},this.shadowRoot.append(h),t.shiftKey||this.#E(null,!1),this.setPointerCapture(t.pointerId),t.preventDefault();return}let s=n.includes(a.labelbox.rotationHandle),o=n.includes(a.labelbox.resizeHandle),l=n.includes(a.labelbox.labelBox)&&!n.some(p=>p instanceof this.ownerDocument.defaultView.Element&&p.matches("button,a,input,select,textarea,[contenteditable]")),u=l&&this.#u(i.label).getItem("selected");if(u||this.#E(a,t.shiftKey),!s&&!o&&!l)return;let c=this.#u(i.label),d=this.getBoundingClientRect(),f=!s&&!o?[...this.children].filter(p=>p===a||this.#u(ee.#e.get(p).label).getItem("selected")).map(p=>({box:p,row:this.#u(ee.#e.get(p).label),...this.#d(p)})):null;if(this.#r={box:a,row:c,members:f,pendingSelection:u,extend:t.shiftKey,moved:!1,id:t.pointerId,left:c.getItem("left"),top:c.getItem("top"),resize:o,rotate:s,angle:c.getItem("rotation"),...this.#d(a),x:t.clientX-d.left,y:t.clientY-d.top},s&&(this.#r.pointerAngle=Math.atan2(t.clientY-d.top-this.clientTop-this.#r.top-this.#r.height/2,t.clientX-d.left-this.clientLeft-this.#r.left-this.#r.width/2)),f)for(let p of f)p.box.setAttribute("data-moving","");else a.setAttribute(s?"data-rotating":"data-resizing","");this.setPointerCapture(t.pointerId),t.preventDefault()}#E(t,n){for(let a of this.children){let i=this.#u(ee.#e.get(a).label),s=a===t?n?!i.getItem("selected"):!0:t&&n?i.getItem("selected"):!1;this.#h(i,{selected:s})}}#h(t,n){this.#l=!0;try{for(let[a,i]of Object.entries(n))t.getItem(a)!==i&&t.setItem(a,i)}finally{this.#l=!1}this.#f()}#_(t){let n=this.#r;if(!n||t.pointerId!==n.id)return;if(n.marquee){this.#v(t);return}if(n.box.parentElement!==this||n.members?.some(f=>f.box.parentElement!==this)){this.#m();return}let a=this.getBoundingClientRect(),i=t.clientX-a.left-n.x,s=t.clientY-a.top-n.y;if(n.rotate){let f=t.clientX-a.left-this.clientLeft-n.left-n.width/2,p=t.clientY-a.top-this.clientTop-n.top-n.height/2;if(Math.hypot(f,p)<1)return;let h=Math.atan2(p,f),m=h-n.pointerAngle,g=Math.atan2(Math.sin(m),Math.cos(m))*180/Math.PI;n.pointerAngle=h,n.angle+=g;let b=this.#b(n.angle,this.parameters.rotationStep,t.shiftKey);this.#h(n.row,this.#y(n.box,n.row,{rotation:b})),this.#s=!0,t.preventDefault();return}if(n.resize){let f=n.rotation*Math.PI/180,p=Math.cos(f),h=Math.sin(f);this.#k(n.box,n.row,this.#b(n.width+(p*i+h*s)/n.scale,this.parameters.gridStep,t.shiftKey),this.#b(n.height+(-h*i+p*s)/n.scale,this.parameters.gridStep,t.shiftKey),n),this.#s=!0,t.preventDefault();return}if(i===0&&s===0&&!n.moved)return;n.moved=!0;let o=this.#b(Math.round(n.left+i),this.parameters.gridStep,t.shiftKey),l=this.#b(Math.round(n.top+s),this.parameters.gridStep,t.shiftKey);(o!==n.left||l!==n.top)&&(this.#s=!0);let u={left:o-n.row.getItem("left"),top:l-n.row.getItem("top")},c=new Set(n.members.map(f=>f.box)),d=1;for(let f of n.members){let p=this.#d(f.box),h={...p,left:p.left+u.left,top:p.top+u.top},m=[...this.children].filter(g=>!c.has(g)&&this.#u(ee.#e.get(g).label).getItem("layer")===f.row.getItem("layer")).map(g=>this.#d(g));d=Math.min(d,jr(p,h,m,this.#g()))}for(let f of n.members)this.#h(f.row,{left:f.row.getItem("left")+u.left*d,top:f.row.getItem("top")+u.top*d});t.preventDefault()}#v(t){let n=this.#r,a=this.getBoundingClientRect(),i=Math.max(0,Math.min(this.clientWidth,t.clientX-a.left-this.clientLeft)),s=Math.max(0,Math.min(this.clientHeight,t.clientY-a.top-this.clientTop)),o=Math.min(n.x,i),l=Math.min(n.y,s),u=Math.max(n.x,i),c=Math.max(n.y,s),d=u>o&&c>l;Object.assign(n.overlay.style,{left:`${o}px`,top:`${l}px`,width:`${u-o}px`,height:`${c-l}px`}),n.overlay.hidden=!d;for(let f of n.marquee){if(f.box.parentElement!==this)continue;let p=d&&je(this.#d(f.box)).every(h=>h.x>=o&&h.x<=u&&h.y>=l&&h.y<=c);this.#h(f.row,{selected:p||n.extend&&f.selected})}this.#s||=d,t.preventDefault()}#b(t,n,a){return a&&n>0?Math.round(t/n)*n:t}#w(){let t=this.#r;if(t.marquee)for(let n of t.marquee)n.box.parentElement===this&&this.#h(n.row,{selected:n.selected});else if(t.members)for(let n of t.members)n.box.parentElement===this&&this.#h(n.row,{left:n.left,top:n.top});else t.box.parentElement===this&&this.#h(t.row,t.rotate?{rotation:t.rotation}:t.resize?{left:t.left,top:t.top,width:t.width,height:t.height}:{left:t.left,top:t.top});this.#s=!1,this.#m()}#m(){let t=this.#r;if(t){if(t.marquee){t.overlay.remove(),this.#r=null,this.hasPointerCapture(t.id)&&this.releasePointerCapture(t.id);return}if(t.members)for(let n of t.members)n.box.removeAttribute("data-moving");this.#r=null,t.box.removeAttribute("data-moving"),t.box.removeAttribute("data-resizing"),t.box.removeAttribute("data-rotating"),this.hasPointerCapture(t.id)&&this.releasePointerCapture(t.id)}}#k(t,n,a,i,s=this.#d(t)){let o=ee.#e.get(t);a=Math.max(o.minWidth,a),i=Math.max(o.minHeight,i);let l=(a-s.width)/2,u=(i-s.height)/2,c=s.rotation*Math.PI/180,d=Math.cos(c)*s.scale,f=Math.sin(c)*s.scale;this.#h(n,this.#y(t,n,{width:a,height:i,left:s.left+d*l-f*u-l,top:s.top+f*l+d*u-u}))}#D(t){if(this.parameters.locked)return;let n=t.composedPath().find(d=>d.parentElement===this),a=ee.#e.get(n);if((this.#r?.rotate||this.#r?.marquee)&&t.key==="Escape"){this.#w(),t.preventDefault(),t.stopPropagation();return}if(a&&t.target===n.labelbox.rotationHandle&&!this.#r){let d={ArrowLeft:-1,ArrowDown:-1,ArrowRight:1,ArrowUp:1}[t.key];if(d){let f=this.#u(a.label);this.#h(f,this.#y(n,f,{rotation:f.getItem("rotation")+d*(t.shiftKey?10:1)})),t.preventDefault(),t.stopPropagation()}return}if(!a||t.target!==n.labelbox.resizeHandle||this.#r)return;let i={ArrowLeft:[-1,0],ArrowRight:[1,0],ArrowUp:[0,-1],ArrowDown:[0,1]};if(!Object.hasOwn(i,t.key))return;let s=this.#u(a.label),[o,l]=i[t.key],u=t.shiftKey?10:1,c=this.#d(n);this.#k(n,s,c.width+o*u,c.height+l*u),t.preventDefault(),t.stopPropagation()}}});var ll=(0,H.defineComponent)({name:"transformPane",tag:"gramlot-transform-pane",base:ve,subTags:"*",sourceContext:!0,parameters:{x:{dtype:"R",default:0,binding:"read"},y:{dtype:"R",default:0,binding:"read"},rotate:{dtype:"R",default:0,binding:"read"},zoom:{dtype:"R",default:1,binding:"read"},min:{dtype:"R",default:.5,binding:"read"},max:{dtype:"R",default:3,binding:"read"},step:{dtype:"R",default:.01,binding:"read"},onEnd:{dtype:"T",nullable:!0}},implementation:r=>class extends r{#e;#n;#t=new Map;#i=null;#a=!1;#o;constructor(){super();let e=this.ownerDocument.createElement("style");e.textContent=":host{touch-action:none;user-select:none;-webkit-user-select:none}.control-box{height:100%}",this.shadowRoot.append(e),this.#o=this.ownerDocument.createElement("input"),this.#o.type="range"}setSourceContext(e){this.#e=e}projectAttributes(e,t){let n=this.parameters,a=super.projectAttributes(e,t),{x:i,y:s,rotate:o,zoom:l,min:u,max:c,step:d}=this.parameters;if(![i,s,o,l,u,c,d].every(Number.isFinite)||u<=0||c<u||d<=0)throw new TypeError("transformPane requires finite x/y/rotate/zoom, positive min/step and max >= min");!this.#a&&n&&["x","y","rotate","zoom","min","max","step"].some(p=>n[p]!==this.parameters[p])&&this.#p(),this.#o.min=String(u),this.#o.max=String(c),this.#o.step=String(d),this.#o.value=String(l);let f=this.#o.valueAsNumber;return!this.#a&&f!==l&&this.#r({zoom:f}),a}connectedCallback(){this.#n=new this.ownerDocument.defaultView.AbortController;let e={signal:this.#n.signal};this.addEventListener("pointerdown",t=>this.#f(t),e),this.addEventListener("pointermove",t=>this.#u(t),e),this.addEventListener("pointerup",t=>this.#d(t),e);for(let t of["pointercancel","lostpointercapture"])this.addEventListener(t,n=>{this.#t.has(n.pointerId)&&this.#p()},e);this.addEventListener("dragstart",t=>t.preventDefault(),e),this.ownerDocument.addEventListener("visibilitychange",()=>{this.ownerDocument.hidden&&this.#p()},e),this.ownerDocument.defaultView.addEventListener("blur",()=>this.#p(),e)}disconnectedCallback(){this.#n?.abort(),this.#n=null,this.#p()}#r(e){this.#a=!0;try{for(let[t,n]of Object.entries(e))n!==this.parameters[t]&&this.#e.writeParameter(t,n)}finally{this.#a=!1}}#l(){let{x:e,y:t,rotate:n,zoom:a}=this.parameters;return{x:e,y:t,rotate:n,zoom:a}}#s(){let[e,t]=this.#t.values();return t?{x:(e.x+t.x)/2,y:(e.y+t.y)/2,distance:Math.hypot(t.x-e.x,t.y-e.y),angle:Math.atan2(t.y-e.y,t.x-e.x)}:{x:e.x,y:e.y,distance:0,angle:0}}#c(){let e=this.#s();if(this.#t.size===2&&e.distance===0){this.#p();return}let t=this.#l();this.#i={initial:this.#i?.initial??t,base:t,geometry:e,lastAngle:e.angle,rotation:0}}#f(e){if(!(e.button!==0||!this.isConnected)&&!(this.#t.size&&(e.pointerType!=="touch"||[...this.#t.values()].some(t=>t.type!=="touch")))){if(this.#t.size===2){this.#p();return}this.#t.set(e.pointerId,{x:e.clientX,y:e.clientY,type:e.pointerType}),this.setPointerCapture(e.pointerId),this.#c()}}#u(e){let t=this.#t.get(e.pointerId);if(!t||!this.#i)return;t.x=e.clientX,t.y=e.clientY;let n=this.#s(),a=this.#i,i={x:a.base.x+n.x-a.geometry.x,y:a.base.y+n.y-a.geometry.y};if(this.#t.size===2){if(n.distance>0){let s=n.angle-a.lastAngle;a.rotation+=Math.atan2(Math.sin(s),Math.cos(s))*180/Math.PI,a.lastAngle=n.angle}i.rotate=a.base.rotate+a.rotation,this.#o.value=String(a.base.zoom*n.distance/a.geometry.distance),i.zoom=this.#o.valueAsNumber}this.#r(i)}#d(e){if(!this.#t.has(e.pointerId))return;if(this.#u(e),this.#t.delete(e.pointerId),this.hasPointerCapture(e.pointerId)&&this.releasePointerCapture(e.pointerId),this.#t.size){this.#c();return}let t=this.#i,n=this.#l();if(this.#p(),t&&Object.keys(n).some(a=>n[a]!==t.initial[a])&&this.parameters.onEnd){let a=this.#e,i=s=>a.reportError(s,"Transform completion failed");try{Promise.resolve(a.callLogic(this.parameters.onEnd,n)).catch(i)}catch(s){i(s)}}}#p(){let e=[...this.#t.keys()];this.#t.clear(),this.#i=null;for(let t of e)this.hasPointerCapture(t)&&this.releasePointerCapture(t)}}});var tp=1600,rp=(0,H.defineComponent)({name:"formlet",tag:"gramlot-formlet",base:ve,subTags:"*",presentationDefaults:["lbl_","box_"],parameters:{columns:{dtype:["L","T"],default:1,binding:"read"},col_min_width:{dtype:"T",nullable:!0,binding:"read"}},implementation:r=>class extends r{#e;constructor(){super();let e=this.ownerDocument.createElement("style");e.textContent=`.control-box{display:grid;gap:inherit;align-items:start}
|
|
222
|
-
:host{gap:var(--gramlot-formlet-gap,8px 16px)}`,this.shadowRoot.append(e),this.#e=new Gn(this)}connectedCallback(){this.#e.connect()}disconnectedCallback(){this.#e.disconnect()}projectAttributes(e,t){let n=super.projectAttributes(e,t),{columns:
|
|
225
|
+
.tray-settings-popup output{font-weight:600;white-space:nowrap}`;let b=e.createElement("output"),y=e.createElement("span"),v=e.createElement("span");y.textContent=o==="layer"?"+10":"200%",v.textContent=o==="layer"?"\u221210":"10%";let w=e.createElement("input");w.type="range",w.min=String(u),w.max=String(c),w.step="1",w.setAttribute("aria-orientation","vertical"),w.setAttribute("aria-label",l),m.append(g,b,y,w,v),t[o]={button:f,popup:m,input:w,output:b}}function n(o,l,u){for(let[c,{popup:d,input:f,button:p}]of Object.entries(t))f.oninput=()=>{u(c,f.valueAsNumber/(c==="scale"?100:1)),i(l())},d.onbeforetoggle=h=>{h.newState==="closed"&&l().getItem(`settings.${c}Open`)===!0&&l().setItem(`settings.${c}Open`,!1)},d.onkeydown=h=>{h.key==="Escape"&&(l().setItem(`settings.${c}Open`,!1),p.focus(),h.stopPropagation())},d.parentNode!==o.shadowRoot&&o.shadowRoot.append(d)}function i(o){for(let[l,{button:u,popup:c,input:d,output:f}]of Object.entries(t)){let p=o.getItem(l)*(l==="scale"?100:1),h=o.getItem(`settings.${l}Open`)===!0;d.value=String(p),f.value=l==="scale"?`${Math.round(p)}%`:`Layer ${p}`,c.setAttribute("aria-label",u.title),u.setAttribute("aria-expanded",String(h)),h?c.matches(":popover-open")||(c.showPopover(),Wn(c,u,{align:"end"})):c.matches(":popover-open")&&c.hidePopover()}}function a(o,l){let u=o.getItem(`settings.${l}Open`)!==!0;for(let c of Object.keys(t))o.setItem(`settings.${c}Open`,c===l&&u);i(o),u&&t[l].input.focus()}function s(){for(let{popup:o}of Object.values(t))o.remove()}return{controls:t,mount:n,project:i,open:a,remove:s}}var ul=(0,q.defineComponent)({name:"trayPane",tag:"gramlot-tray-pane",base:ve,subTags:"*",bagStore:!0,parameters:{storepath:{dtype:"T"},locked:{dtype:"B",default:!1,binding:"read"},gridStep:{dtype:"L",default:10,binding:"read"},gridVisible:{dtype:"B",default:!1,binding:"read"},rotationStep:{dtype:"N",default:15,binding:"read"}},childParameters:{closable:{dtype:"B",default:!1},minWidth:{dtype:"N",default:100},minHeight:{dtype:"N",default:64}},implementation:r=>class ee extends r{static#e=new WeakMap;static projectChild(t,n,{label:i,remove:a}){if(!t.labelbox)throw new TypeError("trayPane children require a Labelbox (declare lbl)");let{minWidth:s=100,minHeight:o=64,closable:l=!1,...u}=n;if(typeof l!="boolean")throw new TypeError("closable must be a boolean");if(![s,o].every(d=>typeof d=="number"&&Number.isFinite(d)&&d>0))throw new TypeError("trayPane minimum dimensions must be positive numbers");ee.#e.set(t,{label:i,minWidth:s,minHeight:o,closable:l,remove:a}),t.setAttribute("data-tray-block","");let c=t.labelbox.traySettings??=ll(t);for(let[d,{button:f}]of Object.entries(c.controls))f.title=`${d==="layer"?"Layer":"Zoom"} for ${n.lbl??i}`,f.setAttribute("aria-label",f.title);if(!t.labelbox.rotationHandle){let d=t.ownerDocument,f=d.createElement("button");f.type="button",f.className="tray-rotate";let p=d.createElementNS(oe,"svg"),h=d.createElementNS(oe,"path");p.setAttribute("viewBox","0 0 24 24"),p.setAttribute("aria-hidden","true"),h.setAttribute("d","M4 10a8 8 0 1 1 2 8M4 4v6h6"),h.setAttribute("fill","none"),h.setAttribute("stroke","currentColor"),h.setAttribute("stroke-width","1.5"),h.setAttribute("stroke-linecap","round"),h.setAttribute("stroke-linejoin","round"),p.append(h),f.append(p),t.labelbox.labelBox.append(f),t.labelbox.rotationHandle=f}if(t.labelbox.rotationHandle.setAttribute("aria-label",`Rotate ${n.lbl??i}`),t.labelbox.rotationHandle.title="Rotate: drag around the center or use arrow keys",l&&!t.labelbox.closeButton){let d=t.ownerDocument.createElement("button");d.type="button",d.className="tray-close";let f=t.ownerDocument.createElementNS(oe,"svg"),p=t.ownerDocument.createElementNS(oe,"path");f.setAttribute("viewBox","0 0 24 24"),f.setAttribute("aria-hidden","true"),p.setAttribute("d","m6 6 12 12M18 6 6 18"),p.setAttribute("fill","none"),p.setAttribute("stroke","currentColor"),p.setAttribute("stroke-width","1.5"),p.setAttribute("stroke-linecap","round"),f.append(p),d.append(f),t.labelbox.labelBox.append(d),t.labelbox.closeButton=d}if(t.labelbox.closeButton&&(t.labelbox.closeButton.hidden=!l,t.labelbox.closeButton.title=`Remove ${n.lbl??i}`,t.labelbox.closeButton.setAttribute("aria-label",t.labelbox.closeButton.title)),t.toggleAttribute("data-movable",!0),t.toggleAttribute("data-resizable",!0),!t.labelbox.resizeHandle){let d=t.ownerDocument,f=d.createElement("button");f.type="button",f.className="tray-resize";let p=d.createElementNS(oe,"svg"),h=d.createElementNS(oe,"path");p.setAttribute("viewBox","0 0 16 16"),p.setAttribute("aria-hidden","true"),h.setAttribute("d","M5 13 13 5M9 13l4-4"),h.setAttribute("fill","none"),h.setAttribute("stroke","currentColor"),h.setAttribute("stroke-width","1.25"),h.setAttribute("stroke-linecap","round"),p.append(h),f.append(p),t.append(f),t.labelbox.resizeHandle=f}return t.labelbox.resizeHandle&&(t.labelbox.resizeHandle.hidden=!1,t.labelbox.resizeHandle.setAttribute("aria-label",`Resize ${n.lbl??i}`),t.labelbox.resizeHandle.title="Resize: drag or use arrow keys"),t.parentElement instanceof ee&&t.parentElement.#f(),{...u,box_position:"absolute",...u.lbl_variant==null?{lbl_variant:"card"}:{}}}#n;#t=new Set;#a=`tray-${Xr()}`;#i;#o=!1;#r;#l=!1;#s=!1;constructor(){super();let t=this.ownerDocument.createElement("style");t.textContent=':host{display:block;position:relative;isolation:isolate;overflow:hidden;min-height:0}.control-box{display:contents}:host::before{content:"";position:absolute;inset:0;pointer-events:none;z-index:-2147483648;display:var(--tray-grid-display,none);background-image:linear-gradient(to right,color-mix(in srgb,currentColor 13%,transparent) 1px,transparent 1px),linear-gradient(to bottom,color-mix(in srgb,currentColor 13%,transparent) 1px,transparent 1px);background-size:var(--tray-grid-size) var(--tray-grid-size)}',t.textContent+=".tray-marquee{position:absolute;box-sizing:border-box;pointer-events:none;z-index:2147483647;border:1px solid var(--gramlot-brand-blue,#3766b5);background:color-mix(in srgb,var(--gramlot-brand-blue,#3766b5) 12%,transparent)}",this.shadowRoot.append(t)}projectAttributes(t){let n=super.projectAttributes(t);for(let i of["gridStep","rotationStep"]){let a=this.parameters[i];if(typeof a!="number"||!Number.isFinite(a)||a<0||i==="gridStep"&&!Number.isInteger(a))throw new TypeError(`trayPane ${i} must be a nonnegative ${i==="gridStep"?"integer":"number"}`)}return this.style.setProperty("--tray-grid-size",`${this.parameters.gridStep}px`),this.style.setProperty("--tray-grid-display",this.parameters.gridVisible&&this.parameters.gridStep>0?"block":"none"),this.parameters.locked&&this.#m(),this.#f(),n}setStoreBag(t){if(!(t instanceof pa))throw new TypeError("trayPane storepath must resolve to a Bag");this.#n!==t&&(this.#m(),this.#n?.unsubscribe(this.#a,{any:!0}),this.#n=t,this.isConnected&&this.#c()),this.#f()}connectedCallback(){this.#n&&this.#c(),this.#i=new this.ownerDocument.defaultView.AbortController;let t={signal:this.#i.signal};this.shadowRoot.querySelector("slot").addEventListener("slotchange",()=>this.#f(),t),this.addEventListener("pointerdown",n=>this.#A(n),t),this.addEventListener("pointermove",n=>this.#_(n),t),this.addEventListener("keydown",n=>this.#D(n),t),this.ownerDocument.addEventListener("keydown",n=>{this.#r?.marquee&&n.key==="Escape"&&(this.#w(),n.preventDefault(),n.stopPropagation())},t),this.addEventListener("pointerup",n=>{n.pointerId===this.#r?.id&&(this.#_(n),this.#r?.pendingSelection&&!this.#r.moved&&this.#E(this.#r.box,this.#r.extend),this.#m())},t),this.addEventListener("pointercancel",n=>{n.pointerId===this.#r?.id&&this.#w()},t),this.addEventListener("lostpointercapture",n=>{n.pointerId===this.#r?.id&&this.#w()},t),this.addEventListener("click",n=>{if(this.#s){this.#s=!1,n.preventDefault(),n.stopPropagation();return}if(this.parameters.locked)return;let i=n.composedPath(),a=i.find(l=>l.parentElement===this);if(!ee.#e.has(a))return;let s=ee.#e.get(a);if(s.closable&&i.includes(a.labelbox.closeButton)){n.preventDefault(),n.stopPropagation(),this.#m(),a.labelbox.traySettings.remove(),this.#t.delete(a.labelbox.traySettings),s.remove(),this.#n.getNode(s.label)&&this.#n.popNode(s.label);return}let o=a.labelbox.traySettings;for(let[l,{button:u}]of Object.entries(o.controls))i.includes(u)&&o.open(this.#u(ee.#e.get(a).label),l)},{...t,capture:!0}),this.#f()}disconnectedCallback(){for(let t of this.#t)t.remove();this.#m(),this.#i.abort(),this.#n?.unsubscribe(this.#a,{any:!0})}#c(){this.#n.subscribe(this.#a,{any:t=>{if(this.#l||((t.node.label!=="selected"||this.#r?.members||this.#r?.marquee)&&this.#m(),!["layer","rotation","scale"].includes(t.node.label)||!["upd_value","upd_value_attr"].includes(t.evt)))return;let n=[...this.children].find(o=>this.#n.getItem([ee.#e.get(o).label])===t.node.parentBag);if(!n)return;let i=t.node.label,a=t.node.value,s=a;if(i==="layer")(!Number.isInteger(a)||this.#p(n,a).some(o=>ol(this.#d(n),o)))&&(s=t.oldvalue);else if(typeof a!="number"||!Number.isFinite(a)||i==="scale"&&a<=0)s=t.oldvalue;else{let o=this.#d(n),l={...o,[i]:t.oldvalue},u=zr(l,o,this.#p(n,t.node.parentBag.getItem("layer")),this.#g());s=t.oldvalue+(a-t.oldvalue)*u}if(s!==a){this.#l=!0;try{t.node.setValue(s)}finally{this.#l=!1}}this.#f()}})}#f(){this.#o||(this.#o=!0,queueMicrotask(()=>{if(this.#o=!1,!(!this.isConnected||!this.#n)){for(let t of this.#t)[...this.children].some(n=>n.labelbox.traySettings===t)||(t.remove(),this.#t.delete(t));for(let t of this.children){let n=ee.#e.get(t),i=this.#u(n.label);t.style.left=`${i.getItem("left")}px`,t.style.top=`${i.getItem("top")}px`,t.style.zIndex=String(i.getItem("layer")),t.style.transformOrigin="center",t.style.transform=`rotate(${i.getItem("rotation")}deg) scale(${i.getItem("scale")})`;let a=t.labelbox.traySettings,s=this.parameters.locked;t.toggleAttribute("data-movable",!s);for(let[o,{button:l}]of Object.entries(a.controls))l.hidden=s,s&&i.getItem(`settings.${o}Open`)===!0&&i.setItem(`settings.${o}Open`,!1);if(t.labelbox.rotationHandle.hidden=s,t.labelbox.closeButton&&(t.labelbox.closeButton.hidden=s||!n.closable),t.labelbox.resizeHandle&&(t.labelbox.resizeHandle.hidden=s),a.mount(this,()=>this.#u(n.label),(o,l)=>{this.parameters.locked||this.#u(n.label).setItem(o,l)}),a.project(i),this.#t.add(a),t.toggleAttribute("data-selected",!s&&i.getItem("selected")),i.getNode("width"))t.style.width=`${i.getItem("width")}px`,t.style.height=`${i.getItem("height")}px`;else{let o=this.ownerDocument.createElement("div").style;o.cssText=t.labelbox.previous.box.style??"",t.style.width=o.width,t.style.height=o.height}}}}))}#u(t){let n=this.#n.getNode([t]),i=n?.value;if(n||(i=new pa({left:0,top:0,layer:0,selected:!1}),this.#n.setItem([t],i)),!(i instanceof pa))throw new TypeError(`trayPane position '${t}' must be a Bag`);i.getNode("selected")||i.setItem("selected",!1);for(let[a,s]of[["rotation",0],["scale",1]])i.getNode(a)||i.setItem(a,s);if(typeof i.getItem("rotation")!="number"||!Number.isFinite(i.getItem("rotation")))throw new TypeError(`trayPane ${t}.rotation must be finite`);if(typeof i.getItem("scale")!="number"||!Number.isFinite(i.getItem("scale"))||i.getItem("scale")<=0)throw new TypeError(`trayPane ${t}.scale must be positive`);if(typeof i.getItem("selected")!="boolean")throw new TypeError(`trayPane ${t}.selected must be boolean`);if(!Number.isInteger(i.getItem("layer")))throw new TypeError(`trayPane ${t}.layer must be an integer`);for(let a of["left","top"]){let s=i.getItem(a);if(typeof s!="number"||!Number.isFinite(s))throw new TypeError(`trayPane ${t}.${a} must be a finite number`)}if(i.getNode("width")||i.getNode("height"))for(let a of["width","height"]){let s=i.getItem(a);if(typeof s!="number"||!Number.isFinite(s)||s<=0)throw new TypeError(`trayPane ${t}.${a} must be a positive number`)}return i}#d(t){let n=this.#u(ee.#e.get(t).label);return{left:n.getItem("left"),top:n.getItem("top"),rotation:n.getItem("rotation"),scale:n.getItem("scale"),width:n.getNode("width")?n.getItem("width"):t.offsetWidth,height:n.getNode("height")?n.getItem("height"):t.offsetHeight}}#p(t,n){return[...this.children].filter(i=>i!==t&&this.#u(ee.#e.get(i).label).getItem("layer")===n).map(i=>this.#d(i))}#g(){return{width:this.clientWidth,height:this.clientHeight}}#y(t,n,i){let a=this.#d(t),s={...a,...i},o=zr(a,s,this.#p(t,n.getItem("layer")),this.#g());return Object.fromEntries(Object.entries(i).map(([l,u])=>[l,a[l]+(u-a[l])*o]))}#A(t){if(this.parameters.locked||t.button!==0||this.#r)return;this.#s=!1;let n=t.composedPath(),i=n.find(p=>p.parentElement===this);if(n.some(p=>p.classList?.contains("tray-settings-popup")&&p.parentNode===this.shadowRoot)||n.find(p=>p instanceof ee)!==this)return;let a=ee.#e.get(i);if(!a){let p=this.getBoundingClientRect(),h=this.ownerDocument.createElement("div");h.className="tray-marquee",h.hidden=!0,h.setAttribute("aria-hidden","true");let m=[...this.children].map(g=>({box:g,row:this.#u(ee.#e.get(g).label),selected:this.#u(ee.#e.get(g).label).getItem("selected")}));this.#r={id:t.pointerId,marquee:m,overlay:h,extend:t.shiftKey,x:t.clientX-p.left-this.clientLeft,y:t.clientY-p.top-this.clientTop},this.shadowRoot.append(h),t.shiftKey||this.#E(null,!1),this.setPointerCapture(t.pointerId),t.preventDefault();return}let s=n.includes(i.labelbox.rotationHandle),o=n.includes(i.labelbox.resizeHandle),l=n.includes(i.labelbox.labelBox)&&!n.some(p=>p instanceof this.ownerDocument.defaultView.Element&&p.matches("button,a,input,select,textarea,[contenteditable]")),u=l&&this.#u(a.label).getItem("selected");if(u||this.#E(i,t.shiftKey),!s&&!o&&!l)return;let c=this.#u(a.label),d=this.getBoundingClientRect(),f=!s&&!o?[...this.children].filter(p=>p===i||this.#u(ee.#e.get(p).label).getItem("selected")).map(p=>({box:p,row:this.#u(ee.#e.get(p).label),...this.#d(p)})):null;if(this.#r={box:i,row:c,members:f,pendingSelection:u,extend:t.shiftKey,moved:!1,id:t.pointerId,left:c.getItem("left"),top:c.getItem("top"),resize:o,rotate:s,angle:c.getItem("rotation"),...this.#d(i),x:t.clientX-d.left,y:t.clientY-d.top},s&&(this.#r.pointerAngle=Math.atan2(t.clientY-d.top-this.clientTop-this.#r.top-this.#r.height/2,t.clientX-d.left-this.clientLeft-this.#r.left-this.#r.width/2)),f)for(let p of f)p.box.setAttribute("data-moving","");else i.setAttribute(s?"data-rotating":"data-resizing","");this.setPointerCapture(t.pointerId),t.preventDefault()}#E(t,n){for(let i of this.children){let a=this.#u(ee.#e.get(i).label),s=i===t?n?!a.getItem("selected"):!0:t&&n?a.getItem("selected"):!1;this.#h(a,{selected:s})}}#h(t,n){this.#l=!0;try{for(let[i,a]of Object.entries(n))t.getItem(i)!==a&&t.setItem(i,a)}finally{this.#l=!1}this.#f()}#_(t){let n=this.#r;if(!n||t.pointerId!==n.id)return;if(n.marquee){this.#v(t);return}if(n.box.parentElement!==this||n.members?.some(f=>f.box.parentElement!==this)){this.#m();return}let i=this.getBoundingClientRect(),a=t.clientX-i.left-n.x,s=t.clientY-i.top-n.y;if(n.rotate){let f=t.clientX-i.left-this.clientLeft-n.left-n.width/2,p=t.clientY-i.top-this.clientTop-n.top-n.height/2;if(Math.hypot(f,p)<1)return;let h=Math.atan2(p,f),m=h-n.pointerAngle,g=Math.atan2(Math.sin(m),Math.cos(m))*180/Math.PI;n.pointerAngle=h,n.angle+=g;let b=this.#b(n.angle,this.parameters.rotationStep,t.shiftKey);this.#h(n.row,this.#y(n.box,n.row,{rotation:b})),this.#s=!0,t.preventDefault();return}if(n.resize){let f=n.rotation*Math.PI/180,p=Math.cos(f),h=Math.sin(f);this.#k(n.box,n.row,this.#b(n.width+(p*a+h*s)/n.scale,this.parameters.gridStep,t.shiftKey),this.#b(n.height+(-h*a+p*s)/n.scale,this.parameters.gridStep,t.shiftKey),n),this.#s=!0,t.preventDefault();return}if(a===0&&s===0&&!n.moved)return;n.moved=!0;let o=this.#b(Math.round(n.left+a),this.parameters.gridStep,t.shiftKey),l=this.#b(Math.round(n.top+s),this.parameters.gridStep,t.shiftKey);(o!==n.left||l!==n.top)&&(this.#s=!0);let u={left:o-n.row.getItem("left"),top:l-n.row.getItem("top")},c=new Set(n.members.map(f=>f.box)),d=1;for(let f of n.members){let p=this.#d(f.box),h={...p,left:p.left+u.left,top:p.top+u.top},m=[...this.children].filter(g=>!c.has(g)&&this.#u(ee.#e.get(g).label).getItem("layer")===f.row.getItem("layer")).map(g=>this.#d(g));d=Math.min(d,zr(p,h,m,this.#g()))}for(let f of n.members)this.#h(f.row,{left:f.row.getItem("left")+u.left*d,top:f.row.getItem("top")+u.top*d});t.preventDefault()}#v(t){let n=this.#r,i=this.getBoundingClientRect(),a=Math.max(0,Math.min(this.clientWidth,t.clientX-i.left-this.clientLeft)),s=Math.max(0,Math.min(this.clientHeight,t.clientY-i.top-this.clientTop)),o=Math.min(n.x,a),l=Math.min(n.y,s),u=Math.max(n.x,a),c=Math.max(n.y,s),d=u>o&&c>l;Object.assign(n.overlay.style,{left:`${o}px`,top:`${l}px`,width:`${u-o}px`,height:`${c-l}px`}),n.overlay.hidden=!d;for(let f of n.marquee){if(f.box.parentElement!==this)continue;let p=d&&je(this.#d(f.box)).every(h=>h.x>=o&&h.x<=u&&h.y>=l&&h.y<=c);this.#h(f.row,{selected:p||n.extend&&f.selected})}this.#s||=d,t.preventDefault()}#b(t,n,i){return i&&n>0?Math.round(t/n)*n:t}#w(){let t=this.#r;if(t.marquee)for(let n of t.marquee)n.box.parentElement===this&&this.#h(n.row,{selected:n.selected});else if(t.members)for(let n of t.members)n.box.parentElement===this&&this.#h(n.row,{left:n.left,top:n.top});else t.box.parentElement===this&&this.#h(t.row,t.rotate?{rotation:t.rotation}:t.resize?{left:t.left,top:t.top,width:t.width,height:t.height}:{left:t.left,top:t.top});this.#s=!1,this.#m()}#m(){let t=this.#r;if(t){if(t.marquee){t.overlay.remove(),this.#r=null,this.hasPointerCapture(t.id)&&this.releasePointerCapture(t.id);return}if(t.members)for(let n of t.members)n.box.removeAttribute("data-moving");this.#r=null,t.box.removeAttribute("data-moving"),t.box.removeAttribute("data-resizing"),t.box.removeAttribute("data-rotating"),this.hasPointerCapture(t.id)&&this.releasePointerCapture(t.id)}}#k(t,n,i,a,s=this.#d(t)){let o=ee.#e.get(t);i=Math.max(o.minWidth,i),a=Math.max(o.minHeight,a);let l=(i-s.width)/2,u=(a-s.height)/2,c=s.rotation*Math.PI/180,d=Math.cos(c)*s.scale,f=Math.sin(c)*s.scale;this.#h(n,this.#y(t,n,{width:i,height:a,left:s.left+d*l-f*u-l,top:s.top+f*l+d*u-u}))}#D(t){if(this.parameters.locked)return;let n=t.composedPath().find(d=>d.parentElement===this),i=ee.#e.get(n);if((this.#r?.rotate||this.#r?.marquee)&&t.key==="Escape"){this.#w(),t.preventDefault(),t.stopPropagation();return}if(i&&t.target===n.labelbox.rotationHandle&&!this.#r){let d={ArrowLeft:-1,ArrowDown:-1,ArrowRight:1,ArrowUp:1}[t.key];if(d){let f=this.#u(i.label);this.#h(f,this.#y(n,f,{rotation:f.getItem("rotation")+d*(t.shiftKey?10:1)})),t.preventDefault(),t.stopPropagation()}return}if(!i||t.target!==n.labelbox.resizeHandle||this.#r)return;let a={ArrowLeft:[-1,0],ArrowRight:[1,0],ArrowUp:[0,-1],ArrowDown:[0,1]};if(!Object.hasOwn(a,t.key))return;let s=this.#u(i.label),[o,l]=a[t.key],u=t.shiftKey?10:1,c=this.#d(n);this.#k(n,s,c.width+o*u,c.height+l*u),t.preventDefault(),t.stopPropagation()}}});var cl=(0,q.defineComponent)({name:"transformPane",tag:"gramlot-transform-pane",base:ve,subTags:"*",sourceContext:!0,parameters:{x:{dtype:"R",default:0,binding:"read"},y:{dtype:"R",default:0,binding:"read"},rotate:{dtype:"R",default:0,binding:"read"},zoom:{dtype:"R",default:1,binding:"read"},min:{dtype:"R",default:.5,binding:"read"},max:{dtype:"R",default:3,binding:"read"},step:{dtype:"R",default:.01,binding:"read"},onEnd:{dtype:"T",nullable:!0}},implementation:r=>class extends r{#e;#n;#t=new Map;#a=null;#i=!1;#o;constructor(){super();let e=this.ownerDocument.createElement("style");e.textContent=":host{touch-action:none;user-select:none;-webkit-user-select:none}.control-box{height:100%}",this.shadowRoot.append(e),this.#o=this.ownerDocument.createElement("input"),this.#o.type="range"}setSourceContext(e){this.#e=e}projectAttributes(e,t){let n=this.parameters,i=super.projectAttributes(e,t),{x:a,y:s,rotate:o,zoom:l,min:u,max:c,step:d}=this.parameters;if(![a,s,o,l,u,c,d].every(Number.isFinite)||u<=0||c<u||d<=0)throw new TypeError("transformPane requires finite x/y/rotate/zoom, positive min/step and max >= min");!this.#i&&n&&["x","y","rotate","zoom","min","max","step"].some(p=>n[p]!==this.parameters[p])&&this.#p(),this.#o.min=String(u),this.#o.max=String(c),this.#o.step=String(d),this.#o.value=String(l);let f=this.#o.valueAsNumber;return!this.#i&&f!==l&&this.#r({zoom:f}),i}connectedCallback(){this.#n=new this.ownerDocument.defaultView.AbortController;let e={signal:this.#n.signal};this.addEventListener("pointerdown",t=>this.#f(t),e),this.addEventListener("pointermove",t=>this.#u(t),e),this.addEventListener("pointerup",t=>this.#d(t),e);for(let t of["pointercancel","lostpointercapture"])this.addEventListener(t,n=>{this.#t.has(n.pointerId)&&this.#p()},e);this.addEventListener("dragstart",t=>t.preventDefault(),e),this.ownerDocument.addEventListener("visibilitychange",()=>{this.ownerDocument.hidden&&this.#p()},e),this.ownerDocument.defaultView.addEventListener("blur",()=>this.#p(),e)}disconnectedCallback(){this.#n?.abort(),this.#n=null,this.#p()}#r(e){this.#i=!0;try{for(let[t,n]of Object.entries(e))n!==this.parameters[t]&&this.#e.writeParameter(t,n)}finally{this.#i=!1}}#l(){let{x:e,y:t,rotate:n,zoom:i}=this.parameters;return{x:e,y:t,rotate:n,zoom:i}}#s(){let[e,t]=this.#t.values();return t?{x:(e.x+t.x)/2,y:(e.y+t.y)/2,distance:Math.hypot(t.x-e.x,t.y-e.y),angle:Math.atan2(t.y-e.y,t.x-e.x)}:{x:e.x,y:e.y,distance:0,angle:0}}#c(){let e=this.#s();if(this.#t.size===2&&e.distance===0){this.#p();return}let t=this.#l();this.#a={initial:this.#a?.initial??t,base:t,geometry:e,lastAngle:e.angle,rotation:0}}#f(e){if(!(e.button!==0||!this.isConnected)&&!(this.#t.size&&(e.pointerType!=="touch"||[...this.#t.values()].some(t=>t.type!=="touch")))){if(this.#t.size===2){this.#p();return}this.#t.set(e.pointerId,{x:e.clientX,y:e.clientY,type:e.pointerType}),this.setPointerCapture(e.pointerId),this.#c()}}#u(e){let t=this.#t.get(e.pointerId);if(!t||!this.#a)return;t.x=e.clientX,t.y=e.clientY;let n=this.#s(),i=this.#a,a={x:i.base.x+n.x-i.geometry.x,y:i.base.y+n.y-i.geometry.y};if(this.#t.size===2){if(n.distance>0){let s=n.angle-i.lastAngle;i.rotation+=Math.atan2(Math.sin(s),Math.cos(s))*180/Math.PI,i.lastAngle=n.angle}a.rotate=i.base.rotate+i.rotation,this.#o.value=String(i.base.zoom*n.distance/i.geometry.distance),a.zoom=this.#o.valueAsNumber}this.#r(a)}#d(e){if(!this.#t.has(e.pointerId))return;if(this.#u(e),this.#t.delete(e.pointerId),this.hasPointerCapture(e.pointerId)&&this.releasePointerCapture(e.pointerId),this.#t.size){this.#c();return}let t=this.#a,n=this.#l();if(this.#p(),t&&Object.keys(n).some(i=>n[i]!==t.initial[i])&&this.parameters.onEnd){let i=this.#e,a=s=>i.reportError(s,"Transform completion failed");try{Promise.resolve(i.callLogic(this.parameters.onEnd,n)).catch(a)}catch(s){a(s)}}}#p(){let e=[...this.#t.keys()];this.#t.clear(),this.#a=null;for(let t of e)this.hasPointerCapture(t)&&this.releasePointerCapture(t)}}});var np=1600,ip=(0,q.defineComponent)({name:"formlet",tag:"gramlot-formlet",base:ve,subTags:"*",presentationDefaults:["lbl_","box_"],parameters:{columns:{dtype:["L","T"],default:1,binding:"read"},col_min_width:{dtype:"T",nullable:!0,binding:"read"}},implementation:r=>class extends r{#e;constructor(){super();let e=this.ownerDocument.createElement("style");e.textContent=`.control-box{display:grid;gap:inherit;align-items:start}
|
|
226
|
+
:host{gap:var(--gramlot-formlet-gap,8px 16px)}`,this.shadowRoot.append(e),this.#e=new Gn(this)}connectedCallback(){this.#e.connect()}disconnectedCallback(){this.#e.disconnect()}projectAttributes(e,t){let n=super.projectAttributes(e,t),{columns:i,col_min_width:a}=this.parameters;if(typeof i=="number"&&(!Number.isInteger(i)||i<1))throw new TypeError("formlet columns must be a positive integer or CSS track list");return this.control.style.gridTemplateColumns=a?`repeat(auto-fit, minmax(min(100%, ${a}), 1fr))`:typeof i=="number"?`repeat(${i}, minmax(0, 1fr))`:i,this.#e.schedule(),Object.fromEntries(Object.entries(n).filter(([s])=>!/^(lbl_|box_)/.test(s)))}}}),ap=(0,q.defineComponent)({name:"groupBox",tag:"gramlot-group-box",base:ve,subTags:"*",dataScope:!0,mixins:[Wr],parameters:{copy:{dtype:"B",default:!1,binding:"read"},lbl_variant:{dtype:"T",default:"bar",binding:"read",enum:["bar","underline","card"]}},implementation:r=>class extends r{#e=0;#n;#t=!1;#a;#i=!1;constructor(){super(),this.control.setAttribute("role","group");let e=this.ownerDocument,t=e.createElement("style");t.textContent=`.gramlot-group-labelbox{gap:0;border:1px solid var(--gramlot-border-control,#aaa);border-radius:var(--gramlot-radius-sm,4px)}
|
|
223
227
|
.gramlot-group-labelbox>.label-box{display:flex;align-items:center;gap:.4em;padding:var(--gramlot-group-header-padding,.35em .65em);background:var(--gramlot-surface-subtle,#eef1f5)}
|
|
224
228
|
.gramlot-group-labelbox>.label-box[hidden]{display:none}.gramlot-group-labelbox>.label-box label{flex:1;min-width:0}
|
|
225
229
|
.gramlot-group-labelbox>.control-box{padding:var(--gramlot-group-padding,.65em)}.gramlot-group-labelbox[data-variant=underline]{border:0}
|
|
@@ -232,4 +236,4 @@ ${" ".repeat(a)}</${s}>`:`<${s}${l}>${f}</${s}>`:t===null||t.includes(s)?`<${s}
|
|
|
232
236
|
.gramlot-group-labelbox>.copy-menu{max-width:var(--gramlot-popup-available-width,100vw);position:fixed;inset:auto;margin:0;padding:var(--gramlot-popup-padding,4px);max-height:var(--gramlot-popup-available-height,100vh);overflow:auto;border:1px solid var(--gramlot-border-control,#aaa);
|
|
233
237
|
background:var(--gramlot-field-background,Canvas);color:var(--gramlot-ink,CanvasText);border-radius:var(--gramlot-radius-sm,4px)}
|
|
234
238
|
.gramlot-group-labelbox>.copy-menu button{display:block;width:100%;text-align:left}
|
|
235
|
-
.gramlot-group-labelbox>.label-box>.actions>.status{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}`,this.actions=e.createElement("span"),this.actions.className="actions",this.copyButton=e.createElement("button"),this.copyButton.type="button",this.copyButton.textContent="\u29C9",this.copyButton.title="Copy TYTX",this.copyButton.setAttribute("aria-label","Copy TYTX"),this.menuButton=e.createElement("button"),this.menuButton.type="button",this.menuButton.textContent="\u25BE",this.menuButton.setAttribute("aria-label","Choose copy format"),this.menuButton.setAttribute("aria-expanded","false"),this.copyMenu=e.createElement("div"),this.copyMenu.className="copy-menu",this.copyMenu.id=`copy-menu-${Xr()}`,this.copyMenu.setAttribute("popover","auto"),this.menuButton.setAttribute("aria-controls",this.copyMenu.id);for(let n of["TYTX","JSON"]){let
|
|
239
|
+
.gramlot-group-labelbox>.label-box>.actions>.status{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}`,this.actions=e.createElement("span"),this.actions.className="actions",this.copyButton=e.createElement("button"),this.copyButton.type="button",this.copyButton.textContent="\u29C9",this.copyButton.title="Copy TYTX",this.copyButton.setAttribute("aria-label","Copy TYTX"),this.menuButton=e.createElement("button"),this.menuButton.type="button",this.menuButton.textContent="\u25BE",this.menuButton.setAttribute("aria-label","Choose copy format"),this.menuButton.setAttribute("aria-expanded","false"),this.copyMenu=e.createElement("div"),this.copyMenu.className="copy-menu",this.copyMenu.id=`copy-menu-${Xr()}`,this.copyMenu.setAttribute("popover","auto"),this.menuButton.setAttribute("aria-controls",this.copyMenu.id);for(let n of["TYTX","JSON"]){let i=e.createElement("button");i.type="button",i.textContent=`Copy ${n}`,i.addEventListener("click",()=>{this.closeCopyMenu(),this.copyData(n)}),this.copyMenu.append(i)}this.status=e.createElement("span"),this.status.className="status",this.status.setAttribute("role","status"),this.copyButton.addEventListener("click",()=>this.copyData("TYTX")),this.menuButton.addEventListener("click",()=>{if(this.#i){this.closeCopyMenu();return}this.copyMenu.showPopover(),this.#i=!0,Wn(this.copyMenu,this.menuButton,{align:"end"});let n=e.defaultView;this.#a=new n.AbortController;let i={capture:!0,signal:this.#a.signal};n.addEventListener("scroll",a=>{a.composedPath().includes(this.copyMenu)||this.closeCopyMenu()},i),n.addEventListener("resize",()=>this.closeCopyMenu(),i),this.copyMenu.firstElementChild.focus()}),this.copyMenu.addEventListener("toggle",n=>{this.menuButton.setAttribute("aria-expanded",String(n.newState==="open")),n.newState==="closed"&&(this.#i=!1,this.#a?.abort(),this.#a=null)}),this.actions.append(this.copyButton,this.menuButton,this.status),this.labelboxStyle=t}setLabelbox(e){super.setLabelbox(e),e.box.classList.add("gramlot-group-labelbox"),this.labelBox.append(this.actions),e.box.append(this.labelboxStyle,this.copyMenu)}closeCopyMenu(){this.#i&&this.copyMenu.hidePopover(),this.#i=!1,this.#a?.abort(),this.#a=null,this.menuButton.setAttribute("aria-expanded","false")}projectAttributes(e,t){let n=super.projectAttributes(e,t);if(!this.constructor.gramlotComponent.parameters.lbl_variant.enum.includes(this.parameters.lbl_variant))throw new TypeError("groupBox lbl_variant must be bar, underline or card");return this.box.classList.add("gramlot-group-labelbox"),this.box.dataset.variant=this.parameters.lbl_variant,this.actions.hidden=!this.parameters.copy,this.parameters.copy||this.closeCopyMenu(),this.labelBox.hidden=this.labelBox.hidden&&!this.parameters.copy,this.copyButton.disabled=this.#t,this.menuButton.disabled=this.#t,n}async copyData(e="TYTX"){if(!["TYTX","JSON"].includes(e))throw new TypeError("Copy format must be TYTX or JSON");if(!this.parameters.copy||this.#t||!this.isConnected)return;let t=++this.#e;this.copyButton.title="Copy TYTX",this.copyButton.textContent="\u29C9",this.status.textContent="",this.#t=!0,this.copyButton.disabled=this.menuButton.disabled=!0,this.ownerDocument.defaultView.clearTimeout(this.#n);try{let n=this.readDataScope(),i=e==="TYTX"?n.toTytx():JSON.stringify(n.asDict(!1,!1,!0),null,2);if(await this.ownerDocument.defaultView.navigator.clipboard.writeText(i),t!==this.#e||!this.isConnected)return;this.copyButton.textContent="\u2713",this.status.textContent=`Copied ${e}`,this.#n=this.ownerDocument.defaultView.setTimeout(()=>{this.copyButton.textContent="\u29C9",this.status.textContent=""},np)}catch(n){if(t!==this.#e||!this.isConnected)return;this.copyButton.textContent="!",this.copyButton.title=this.status.textContent=`Copy failed: ${n.message}`}finally{t===this.#e&&(this.#t=!1,this.copyButton.disabled=this.menuButton.disabled=!1)}}disconnectedCallback(){this.closeCopyMenu(),this.#e++,this.#t=!1,this.ownerDocument.defaultView.clearTimeout(this.#n)}}}),h_=Jn({name:"layout",components:[cl,il,al,tl,ul,ip,ap,el,rr,rl,nl]});export{rr as BorderContainer,el as ContentPane,il as Dialog,al as FloatingPane,ip as Formlet,tl as FramePane,ap as GroupBox,rl as StackContainer,nl as TabContainer,cl as TransformPane,ul as TrayPane,h_ as default};
|