@protobase/ui 0.21.3 → 0.21.5

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.
@@ -1,4 +1,4 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./react-Cvdyeg_0.js";import{dt as n}from"./app-wZRscg1o.js";import{t as r}from"./jsx-runtime-NZYk81nU.js";var i=e(t(),1);function a(e,t){this.v=e,this.k=t}function o(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function s(e){if(Array.isArray(e))return e}function c(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function l(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./react-Cvdyeg_0.js";import{dt as n}from"./app-BmBlR0fJ.js";import{t as r}from"./jsx-runtime-NZYk81nU.js";var i=e(t(),1);function a(e,t){this.v=e,this.k=t}function o(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function s(e){if(Array.isArray(e))return e}function c(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function l(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function u(e,t){return s(e)||c(e,t)||d(e,t)||l()}function d(e,t){if(e){if(typeof e==`string`)return o(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}function f(e){var t,n;function r(t,n){try{var o=e[t](n),s=o.value,c=s instanceof a;Promise.resolve(c?s.v:s).then(function(n){if(c){var a=t===`return`&&s.k?t:`next`;if(!s.k||n.done)return r(a,n);n=e[a](n).value}i(!!o.done,n)},function(e){r(`throw`,e)})}catch(e){i(2,e)}}function i(e,i){e===2?t.reject(i):t.resolve({value:i,done:e}),(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(e,i){return new Promise(function(a,o){var s={key:e,arg:i,resolve:a,reject:o,next:null};n?n=n.next=s:(t=n=s,r(e,i))})},typeof e.return!=`function`&&(this.return=void 0)}f.prototype[typeof Symbol==`function`&&Symbol.asyncIterator||`@@asyncIterator`]=function(){return this},f.prototype.next=function(e){return this._invoke(`next`,e)},f.prototype.throw=function(e){return this._invoke(`throw`,e)},f.prototype.return=function(e){return this._invoke(`return`,e)};var p=Object.entries,m=Object.setPrototypeOf,h=Object.isFrozen,ee=Object.getPrototypeOf,te=Object.getOwnPropertyDescriptor,g=Object.freeze,_=Object.seal,ne=Object.create,re=typeof Reflect<`u`&&Reflect,ie=re.apply,ae=re.construct;g||=function(e){return e},_||=function(e){return e},ie||=function(e,t){var n=[...arguments].slice(2);return e.apply(t,n)},ae||=function(e){return new e(...[...arguments].slice(1))};var v=w(Array.prototype.forEach);Array.prototype.indexOf;var oe=w(Array.prototype.lastIndexOf),se=w(Array.prototype.pop),ce=w(Array.prototype.push),le=w(Array.prototype.slice),ue=w(Array.prototype.splice),de=Array.isArray,fe=we(Set),pe=w(Set.prototype.add),me=w(Set.prototype.has),he=w(String.prototype.toLowerCase),ge=w(String.prototype.toString),_e=w(String.prototype.match),ve=w(String.prototype.replace),ye=w(String.prototype.indexOf),be=w(String.prototype.trim),xe=w(Number.prototype.toString),Se=w(Boolean.prototype.toString),Ce=typeof BigInt>`u`?null:w(BigInt.prototype.toString),y=typeof Symbol>`u`?null:w(Symbol.prototype.toString),b=w(Object.prototype.hasOwnProperty),x=w(Object.prototype.toString),S=w(RegExp.prototype.test),C=we(TypeError);function w(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);var n=[...arguments].slice(1);return ie(e,t,n)}}function we(e){return function(){return ae(e,[...arguments])}}function T(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:he;if(m&&m(e,null),!de(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(h(t)||(t[r]=e),i=e)}e[i]=!0}return e}function E(e){for(let t=0;t<e.length;t++)b(e,t)||(e[t]=null);return e}function D(e){let t=ne(null);for(let r of p(e)){var n=u(r,2);let i=n[0],a=n[1];b(e,i)&&(t[i]=de(a)?E(a):a&&typeof a==`object`&&a.constructor===Object?D(a):a)}return t}function Te(e){switch(typeof e){case`string`:return e;case`number`:return xe(e);case`boolean`:return Se(e);case`bigint`:return Ce?Ce(e):`0`;case`symbol`:return y?y(e):`Symbol()`;case`undefined`:return x(e);case`function`:case`object`:{if(e===null)return x(e);let t=e,n=O(t,`toString`);if(typeof n==`function`){let e=n(t);return typeof e==`string`?e:x(e)}return x(e)}default:return x(e)}}function O(e,t){for(;e!==null;){let n=te(e,t);if(n){if(n.get)return w(n.get);if(typeof n.value==`function`)return w(n.value)}e=ee(e)}function n(){return null}return n}function Ee(e,t){for(;e!==null;){let n=te(e,t);if(n)return n.get?w(n.get):null;e=ee(e)}return null}function De(e){try{return S(e,``),!0}catch{return!1}}var Oe=g(`a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr`.split(`.`)),ke=g(`svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),Ae=g([`feBlend`,`feColorMatrix`,`feComponentTransfer`,`feComposite`,`feConvolveMatrix`,`feDiffuseLighting`,`feDisplacementMap`,`feDistantLight`,`feDropShadow`,`feFlood`,`feFuncA`,`feFuncB`,`feFuncG`,`feFuncR`,`feGaussianBlur`,`feImage`,`feMerge`,`feMergeNode`,`feMorphology`,`feOffset`,`fePointLight`,`feSpecularLighting`,`feSpotLight`,`feTile`,`feTurbulence`]),je=g([`animate`,`color-profile`,`cursor`,`discard`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`foreignobject`,`hatch`,`hatchpath`,`mesh`,`meshgradient`,`meshpatch`,`meshrow`,`missing-glyph`,`script`,`set`,`solidcolor`,`unknown`,`use`]),Me=g(`math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts`.split(`.`)),Ne=g([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),Pe=g([`#text`]),Fe=g(`accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns`.split(`.`)),Ie=g(`accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dominant-baseline.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.pointer-events.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-orientation.text-rendering.textlength.type.u1.u2.unicode.values.vector-effect.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan`.split(`.`)),Le=g(`accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns`.split(`.`)),Re=g([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),ze=_(/{{[\w\W]*|^[\w\W]*}}/g),Be=_(/<%[\w\W]*|^[\w\W]*%>/g),Ve=_(/\${[\w\W]*/g),He=_(/^data-[\-\w.\u00B7-\uFFFF]+$/),Ue=_(/^aria-[\-\w]+$/),We=_(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Ge=_(/^(?:\w+script|data):/i),Ke=_(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),qe=_(/^html$/i),Je=_(/^[a-z][.\w]*(-[.\w]+)+$/i),Ye=_(/<[/\w!]/g),Xe=_(/<[/\w]/g),Ze=_(/<\/no(script|embed|frames)/i),Qe=_(/\/>/i),k={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},$e=g(T({},[`style`,`script`,`xmp`,`iframe`,`noembed`,`noframes`,`plaintext`,`noscript`])),et=function(){return typeof window>`u`?null:window},tt=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},nt=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},rt=function(e,t,n,r){return b(e,t)&&de(e[t])?T(r.base?D(r.base):{},e[t],r.transform):n},it=function(e,t,n){let r=b(e,t)?e[t]:void 0;return r&&typeof r==`object`?D(r):n()};function at(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:et(),t=e=>at(e);if(t.version=`3.4.17`,t.removed=[],!e||!e.document||e.document.nodeType!==k.document||!e.Element)return t.isSupported=!1,t;let n=e.document,r=n,i=r.currentScript;e.DocumentFragment;let a=e.HTMLTemplateElement,o=e.Node,s=e.Element,c=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;let l=e.DOMParser,u=e.trustedTypes,d=s.prototype,f=O(d,`cloneNode`),m=O(d,`remove`),h=O(d,`removeAttributeNode`),ee=O(d,`nextSibling`),te=O(d,`childNodes`),re=O(d,`parentNode`),ie=O(d,`shadowRoot`),ae=O(d,`attributes`),xe=o&&o.prototype?O(o.prototype,`nodeType`):null,Se=o&&o.prototype?O(o.prototype,`nodeName`):null,Ce=o&&o.prototype?O(o.prototype,`ownerDocument`):null,y=function(e){return xe?xe(e):e.nodeType},x=function(e){return Se?Se(e):e.nodeName},w=Ee(d,`namespaceURI`),we=function(e){return w?w(e):e.namespaceURI};if(typeof a==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let E,ot=``,st,ct=!1,lt=0,A=function(){if(lt>0)throw C(`A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.`)},j=function(e){A(),lt++;try{return E.createHTML(e)}finally{lt--}},M=function(e){A(),lt++;try{return E.createScriptURL(e)}finally{lt--}},ut=function(){return ct||=(st=tt(u,i),!0),st},N=n,dt=N.implementation,ft=N.createNodeIterator,pt=N.createDocumentFragment,mt=N.getElementsByTagName,ht=r.importNode,P=nt();t.isSupported=typeof p==`function`&&typeof re==`function`&&dt&&dt.createHTMLDocument!==void 0;let gt=ze,_t=Be,vt=Ve,yt=He,bt=Ue,xt=Ge,St=Ke,Ct=Je,wt=We,F=null,Tt=T({},[...Oe,...ke,...Ae,...Me,...Pe]),I=null,Et=T({},[...Fe,...Ie,...Le,...Re]),L=Object.seal(ne(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Dt=null,Ot=null,R=Object.seal(ne(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),kt=!0,At=!0,jt=!1,Mt=!0,z=!1,B=!0,V=!1,Nt=!1,Pt=null,Ft=null,It=!1,Lt=!1,Rt=!1,zt=!1,Bt=!0,Vt=!1,Ht=`user-content-`,Ut=!0,Wt=!1,Gt=null,Kt={},qt=null,Jt=T({},`annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp`.split(`.`)),Yt=null,Xt=T({},[`audio`,`video`,`img`,`source`,`image`,`track`]),Zt=null,Qt=T({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),$t=`http://www.w3.org/1998/Math/MathML`,en=`http://www.w3.org/2000/svg`,H=`http://www.w3.org/1999/xhtml`,tn=H,nn=!1,rn=null,an=T({},[$t,en,H],ge),on=g([`mi`,`mo`,`mn`,`ms`,`mtext`]),sn=T({},on),cn=g([`annotation-xml`]),ln=T({},cn),un=T({},[`title`,`style`,`font`,`a`,`script`]),dn=null,fn=[`application/xhtml+xml`,`text/html`],U=null,pn=null,mn=n.createElement(`form`),hn=function(e){return e instanceof RegExp||e instanceof Function},gn=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(pn&&pn===e)return;(!e||typeof e!=`object`)&&(e={}),e=D(e),dn=fn.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,U=dn===`application/xhtml+xml`?ge:he,F=rt(e,`ALLOWED_TAGS`,Tt,{transform:U}),I=rt(e,`ALLOWED_ATTR`,Et,{transform:U}),rn=rt(e,`ALLOWED_NAMESPACES`,an,{transform:ge}),Zt=rt(e,`ADD_URI_SAFE_ATTR`,Qt,{transform:U,base:Qt}),Yt=rt(e,`ADD_DATA_URI_TAGS`,Xt,{transform:U,base:Xt}),qt=rt(e,`FORBID_CONTENTS`,Jt,{transform:U}),Dt=rt(e,`FORBID_TAGS`,D({}),{transform:U}),Ot=rt(e,`FORBID_ATTR`,D({}),{transform:U}),Kt=b(e,`USE_PROFILES`)?e.USE_PROFILES&&typeof e.USE_PROFILES==`object`?D(e.USE_PROFILES):e.USE_PROFILES:!1,kt=e.ALLOW_ARIA_ATTR!==!1,At=e.ALLOW_DATA_ATTR!==!1,jt=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Mt=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,z=e.SAFE_FOR_TEMPLATES||!1,B=e.SAFE_FOR_XML!==!1,V=e.WHOLE_DOCUMENT||!1,Lt=e.RETURN_DOM||!1,Rt=e.RETURN_DOM_FRAGMENT||!1,zt=e.RETURN_TRUSTED_TYPE||!1,It=e.FORCE_BODY||!1,Bt=e.SANITIZE_DOM!==!1,Vt=e.SANITIZE_NAMED_PROPS||!1,Ut=e.KEEP_CONTENT!==!1,Wt=e.IN_PLACE||!1,wt=De(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:We,tn=typeof e.NAMESPACE==`string`?e.NAMESPACE:H,sn=it(e,`MATHML_TEXT_INTEGRATION_POINTS`,()=>T({},on)),ln=it(e,`HTML_INTEGRATION_POINTS`,()=>T({},cn));let t=it(e,`CUSTOM_ELEMENT_HANDLING`,()=>ne(null));if(L=ne(null),b(t,`tagNameCheck`)&&hn(t.tagNameCheck)&&(L.tagNameCheck=t.tagNameCheck),b(t,`attributeNameCheck`)&&hn(t.attributeNameCheck)&&(L.attributeNameCheck=t.attributeNameCheck),b(t,`allowCustomizedBuiltInElements`)&&typeof t.allowCustomizedBuiltInElements==`boolean`&&(L.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),_(L),z&&(At=!1),Rt&&(Lt=!0),Kt&&(F=T({},Pe),I=ne(null),Kt.html===!0&&(T(F,Oe),T(I,Fe)),Kt.svg===!0&&(T(F,ke),T(I,Ie),T(I,Re)),Kt.svgFilters===!0&&(T(F,Ae),T(I,Ie),T(I,Re)),Kt.mathMl===!0&&(T(F,Me),T(I,Le),T(I,Re))),R.tagCheck=null,R.attributeCheck=null,b(e,`ADD_TAGS`)&&(typeof e.ADD_TAGS==`function`?R.tagCheck=e.ADD_TAGS:de(e.ADD_TAGS)&&(F===Tt&&(F=D(F)),T(F,e.ADD_TAGS,U))),b(e,`ADD_ATTR`)&&(typeof e.ADD_ATTR==`function`?R.attributeCheck=e.ADD_ATTR:de(e.ADD_ATTR)&&(I===Et&&(I=D(I)),T(I,e.ADD_ATTR,U))),b(e,`ADD_FORBID_CONTENTS`)&&de(e.ADD_FORBID_CONTENTS)&&(qt===Jt&&(qt=D(qt)),T(qt,e.ADD_FORBID_CONTENTS,U)),Ut&&(F[`#text`]=!0),V&&T(F,[`html`,`head`,`body`]),F.table&&(T(F,[`tbody`]),delete Dt.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw C(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw C(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);let t=E;E=e.TRUSTED_TYPES_POLICY;try{ot=j(``)}catch(e){throw E=t,e}}else e.TRUSTED_TYPES_POLICY===null?(E=void 0,ot=``):(E===void 0&&(E=ut()),E&&typeof ot==`string`&&(ot=j(``)));g&&g(e),pn=e},_n=T({},[...ke,...Ae,...je]),vn=T({},[...Me,...Ne]),yn=function(e,t,n){return t.namespaceURI===H?e===`svg`:t.namespaceURI===$t?e===`svg`&&(n===`annotation-xml`||sn[n]):!!_n[e]},W=function(e,t,n){return t.namespaceURI===H?e===`math`:t.namespaceURI===en?e===`math`&&ln[n]:!!vn[e]},bn=function(e,t,n){return t.namespaceURI===en&&!ln[n]||t.namespaceURI===$t&&!sn[n]?!1:!vn[e]&&(un[e]||!_n[e])},xn=function(e){let t=we(e),n=he(x(e)),r=re(e),i,a;return r&&y(r)===k.element?(i={namespaceURI:we(r)},a=he(x(r))):(i={namespaceURI:tn},a=`template`),rn[t]?t===en?yn(n,i,a):t===$t?W(n,i,a):t===H?bn(n,i,a):!!(dn===`application/xhtml+xml`&&rn[t]):!1},G=function(e){ce(t.removed,{element:e});try{re(e).removeChild(e)}catch{if(m(e),!re(e))throw C(`a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place`)}},K=function(e,t,n){try{h(e,t)}catch{try{e.removeAttribute(n)}catch{}}},Sn=function(e){Tn(e);let t=te(e);t&&v(le(t),e=>{try{m(e)}catch{}});let n=y(e)===k.element?ae(e):null;if(n)for(let t=n.length-1;t>=0;--t){let r=n[t],i=r&&r.name;typeof i==`string`&&K(e,r,i)}},q=function(e,n,r){if(!r)try{r=n.getAttributeNode(e)}catch{r=null}ce(t.removed,{attribute:r||null,from:n});try{r?h(n,r):n.removeAttribute(e)}catch{try{n.removeAttribute(e)}catch{}}if(e===`is`){if(Lt||Rt)try{G(n)}catch{}else try{n.setAttribute(e,``)}catch{}}},Cn=function(e){let t=ae(e);if(t)for(let n=t.length-1;n>=0;--n){let r=t[n],i=r&&r.name;typeof i!=`string`||I[U(i)]||K(e,r,i)}},wn=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2],r=[e];for(;r.length>0;){let e=r.pop();if(t(e)===!1)continue;if(n&&y(e)===k.element){let t=ie(e);Q(t)&&r.push(t)}let i=te(e);if(i)for(let e=i.length-1;e>=0;--e)r.push(i[e])}},Tn=function(e){wn(e,e=>{y(e)===k.element&&Cn(e)})},En=function(e){let t=[];return wn(e,e=>{t.push(e)},!0),t},Dn=function(e,t){let n=fe();v(En(e),e=>{y(e)===k.element&&pe(n,e)}),v(t,e=>{y(e)===k.element&&!me(n,e)&&Cn(e)})},On=function(e,n){let r=!1;return v(t.removed,t=>{t.element&&(r||=t.element===e,Tn(t.element))}),Dn(e,n),r},J=function(e,t){let n=Gt,r=null,i=()=>(r||(r=fe(),v(t,e=>{pe(r,e)})),r);for(let t=0;;t++){let r=En(e),a=[e],o=!1;if(v(r,e=>{y(e)===k.documentFragment?ce(a,e):!o&&!me(n,e)&&(o=me(i(),e))}),!o)return;if(t>=8)throw C(`the tree kept changing during in-place sanitization; refusing to return it`);v(a,(t,n)=>{kn(t,n>0,e,i())})}},kn=function(e,t,n,r){let i=Nn(e),a;for(;a=i.nextNode();)me(r,a)&&!me(Gt,a)&&(t&&$(P.uponSanitizeShadowNode,a,null),Hn(a,n),Yn(a,n),Q(a.content)&&Xn(a.content))},An=function(e){Gt&&pe(Gt,e)},Y=function(e,t){return B?e===`patchsrc`||e===`for`&&t!==`label`&&t!==`output`:!1},jn=function(e){B&&wn(e,e=>{let t=y(e);if(t===k.processingInstruction||t===k.comment&&S(Xe,e.data)){try{m(e)}catch{}return!1}if(t===k.element){let t=e,n=U(x(e));try{t.hasAttribute&&t.hasAttribute(`patchsrc`)&&t.removeAttribute(`patchsrc`),t.hasAttribute&&t.hasAttribute(`for`)&&Y(`for`,n)&&t.removeAttribute(`for`)}catch{}}return!0})},Mn=function(e){let t=null,r=null;if(It)e=`<remove></remove>`+e;else{let t=_e(e,/^[\r\n\t ]+/);r=t&&t[0]}dn===`application/xhtml+xml`&&tn===H&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=E?j(e):e;if(tn===H)try{t=new l().parseFromString(i,dn)}catch{}if(!t||!t.documentElement){t=dt.createDocument(tn,`template`,null);try{t.documentElement.innerHTML=nn?ot:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),tn===H?mt.call(t,V?`html`:`body`)[0]:V?t.documentElement:a},Nn=function(e){let t=Ce?Ce(e):e.ownerDocument;return ft.call(t||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},X=function(e){return e=ve(e,gt,` `),e=ve(e,_t,` `),e=ve(e,vt,` `),e},Z=function(e){Pn(e);let t=e.querySelectorAll?.call(e,`template`);t&&v(t,e=>{Q(e.content)&&Z(e.content)})},Pn=function(e){e.normalize();let t=Ce?Ce(e):e.ownerDocument,n=ft.call(t||e,e,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null),r=n.nextNode();for(;r;)r.data=X(r.data),r=n.nextNode()},Fn=function(e){let t=Se?Se(e):null;return typeof t!=`string`||U(t)!==`form`?!1:typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||e.attributes!==ae(e)||typeof e.removeAttribute!=`function`||typeof e.removeAttributeNode!=`function`||typeof e.getAttributeNode!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`||e.nodeType!==xe(e)||e.childNodes!==te(e)},Q=function(e){if(!xe||typeof e!=`object`||!e)return!1;try{return xe(e)===k.documentFragment}catch{return!1}},In=function(e){if(!xe||typeof e!=`object`||!e)return!1;try{return typeof xe(e)==`number`}catch{return!1}};function $(e,n,r){e.length!==0&&v(e,e=>{e.call(t,n,r,pn)})}let Ln=function(e,t){return!!(B&&e.hasChildNodes()&&!In(e.firstElementChild)&&S(Ye,e.textContent)&&S(Ye,e.innerHTML)||B&&$e[t]&&y(e)===k.element&&we(e)===H&&(In(e.firstElementChild)||typeof e.textContent==`string`&&S(Ye,e.textContent))||e.nodeType===k.processingInstruction||B&&e.nodeType===k.comment&&S(Xe,e.data))},Rn=function(e,t){return e instanceof RegExp?S(e,t):e instanceof Function&&!!e(t,...[...arguments].slice(2))},zn=function(e,t,n){if(!Dt[t]&&Gn(t)&&Rn(L.tagNameCheck,t))return!1;if(Ut&&!qt[t]&&!qt[he(t)]){let t=re(e),r=te(e);if(r&&t){let i=r.length;for(let a=i-1;a>=0;--a){let i=e===n?f(r[a],!0):r[a];t.insertBefore(i,ee(e))}}}return G(e),!0},Bn=function(e,t,n,r){return e.length===0?t:t===n||t===r?D(t):t},Vn=function(e,t){return e===t||re(e)!==null?!1:(Wt&&Tn(e),!0)},Hn=function(e,n){if(An(e),$(P.beforeSanitizeElements,e,null),Vn(e,n))return!0;if(Fn(e))return G(e),!0;let r=U(x(e));if(F=Bn(P.uponSanitizeElement,F,Tt,Pt),$(P.uponSanitizeElement,e,{tagName:r,allowedTags:F}),Vn(e,n))return!0;if(Ln(e,r))return G(e),!0;if(Dt[r]||!(R.tagCheck instanceof Function&&R.tagCheck(r))&&!F[r]){let t=zn(e,r,n);return t===!1&&($(P.afterSanitizeElements,e,null),Vn(e,n))?!0:t}if(y(e)===k.element&&!xn(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&S(Ze,e.innerHTML))return G(e),!0;if(z&&e.nodeType===k.text){let n=X(e.textContent);e.textContent!==n&&(ce(t.removed,{element:e.cloneNode()}),e.textContent=n)}return $(P.afterSanitizeElements,e,null),Vn(e,n)},Un=function(e,t,r){if(Ot[t]||Y(t,e)||Bt&&(t===`id`||t===`name`)&&(r in n||r in mn))return!1;let i=I[t]||R.attributeCheck instanceof Function&&R.attributeCheck(t,e);return At&&S(yt,t)||kt&&S(bt,t)?!0:i?Zt[t]||S(wt,ve(r,St,``))||(t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&ye(r,`data:`)===0&&Yt[e]||jt&&!S(xt,ve(r,St,``))?!0:!r:Gn(e)&&Rn(L.tagNameCheck,e)&&Rn(L.attributeNameCheck,t,e)||t===`is`&&L.allowCustomizedBuiltInElements&&Rn(L.tagNameCheck,r)},Wn=T({},[`annotation-xml`,`color-profile`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`missing-glyph`]),Gn=function(e){return!Wn[he(e)]&&S(Ct,e)},Kn=function(e,t,n,r){if(E&&typeof u==`object`&&typeof u.getAttributeType==`function`&&!n)switch(u.getAttributeType(e,t)){case`TrustedHTML`:return j(r);case`TrustedScriptURL`:return M(r)}return r},qn=function(e,t,n,r){try{return n?e.setAttributeNS(n,t,r):e.setAttribute(t,r),!Fn(e)||(G(e),!1)}catch{return q(t,e),!1}},Jn=function(e,t){return B&&S(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,t)?!0:he(e)===`attributename`&&_e(t,`href`)!==null},Yn=function(e,n){if($(P.beforeSanitizeAttributes,e,null),Vn(e,n))return;let r=e.attributes;if(!r||Fn(e))return;I=Bn(P.uponSanitizeAttribute,I,Et,Ft);let i={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:I,forceKeepAttr:void 0},a=r.length,o=U(e.nodeName);for(;a--;){let n=r[a],s=n.name,c=n.namespaceURI,l=n.value,u=U(s),d=l,f=s===`value`?d:be(d),p=!1;if(i.attrName=u,i.attrValue=f,i.keepAttr=!0,i.forceKeepAttr=void 0,$(P.uponSanitizeAttribute,e,i),f=i.attrValue,Vt&&(u===`id`||u===`name`)&&ye(f,Ht)!==0&&(q(s,e,n),f=Ht+f,p=!0),Jn(s,f)){q(s,e,n);continue}if(!i.forceKeepAttr){if(!i.keepAttr){q(s,e,n);continue}if(!Mt&&S(Qe,f)){q(s,e,n);continue}if(z&&(f=X(f)),!Un(o,u,f)){q(s,e,n);continue}f=Kn(o,u,c,f),f!==d&&qn(e,s,c,f)&&p&&se(t.removed)}}$(P.afterSanitizeAttributes,e,null),Vn(e,n)},Xn=function(e){let t=null,n=Nn(e);for($(P.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if($(P.uponSanitizeShadowNode,t,null),Hn(t,e),Yn(t,e),Q(t.content)&&Xn(t.content),y(t)===k.element){let e=ie(t);Q(e)&&(Zn(e),Xn(e))}z&&Pn(e),$(P.afterSanitizeShadowDOM,e,null)},Zn=function(e){let t=[{node:e,shadow:null}];for(;t.length>0;){let e=t.pop();if(e.shadow){Xn(e.shadow);continue}let n=e.node,r=y(n)===k.element,i=te(n);if(i)for(let e=i.length-1;e>=0;--e)t.push({node:i[e],shadow:null});if(r){let e=Se?Se(n):null;if(typeof e==`string`&&U(e)===`template`){let e=n.content;Q(e)&&t.push({node:e,shadow:null})}}if(r){let e=ie(n);Q(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,a=null,o=null,s=null;if(nn=!e,nn&&(e=`<!-->`),typeof e!=`string`&&!In(e)&&(e=Te(e),typeof e!=`string`))throw C(`dirty is not a string, aborting`);if(!t.isSupported)return e;Nt?(F=Pt,I=Ft):gn(n),(P.uponSanitizeElement.length>0||P.uponSanitizeAttribute.length>0)&&(F=D(F)),P.uponSanitizeAttribute.length>0&&(I=D(I)),t.removed=[];let c=Wt&&typeof e!=`string`&&In(e),l=[],u=Gt;if(c){jn(e);let t=x(e);if(typeof t==`string`){let n=U(t);if(!F[n]||Dt[n])throw Sn(e),C(`root node is forbidden and cannot be sanitized in-place`)}if(Fn(e))throw Sn(e),C(`root node is clobbered and cannot be sanitized in-place`);l=En(e),Gt=fe()}else if(In(e))i=Mn(`<!---->`),a=i.ownerDocument.importNode(e,!0),a.nodeType===k.element&&a.nodeName===`BODY`||a.nodeName===`HTML`?i=a:i.appendChild(a),Zn(i);else{if(!Lt&&!z&&!V&&e.indexOf(`<`)===-1)return E&&zt?j(e):e;if(i=Mn(e),!i)return Lt?null:zt?ot:``}i&&It&&G(i.firstChild);let d=c?e:i;try{c&&Zn(e);let t=Nn(d);for(;o=t.nextNode();)Hn(o,d),Yn(o,d),Q(o.content)&&Xn(o.content);c&&J(e,l)}catch(t){throw c&&(Sn(e),On(e,l)),t}finally{Gt=u}if(c){if(On(e,l))throw C(`a node selected for removal could not be safely returned; refusing to sanitize in place`);return z&&Z(e),e}if(Lt){if(z&&Z(i),Rt)for(s=pt.call(i.ownerDocument);i.firstChild;)s.appendChild(i.firstChild);else s=i;return(I.shadowroot||I.shadowrootmode)&&(s=ht.call(r,s,!0)),s}let f=V?i.outerHTML:i.innerHTML;return V&&F[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&S(qe,i.ownerDocument.doctype.name)&&(f=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
3
3
  `+f),z&&(f=X(f)),E&&zt?j(f):f},t.setConfig=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};gn(e),Nt=!0,Pt=F,Ft=I},t.clearConfig=function(){pn=null,Nt=!1,Pt=null,Ft=null,E=st,ot=``},t.isValidAttribute=function(e,t,n){pn||gn({});let r=U(e),i=U(t);return typeof n==`string`&&(Jn(t,n)||!Mt&&S(Qe,n))?!1:Un(r,i,n)},t.addHook=function(e,t){typeof t==`function`&&b(P,e)&&ce(P[e],t)},t.removeHook=function(e,t){if(b(P,e)){if(t!==void 0){let n=oe(P[e],t);return n===-1?void 0:ue(P[e],n,1)[0]}return se(P[e])}},t.removeHooks=function(e){b(P,e)&&(P[e]=[])},t.removeAllHooks=function(){P=nt()},t}var ot=at();function st(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ct=st();function lt(e){ct=e}var A={exec:()=>null};function j(e){let t=[];return n=>{let r=Math.max(0,Math.min(3,n-1)),i=t[r];return i||(i=e(r),t[r]=i),i}}function M(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(N.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var ut=((e=``)=>{try{return!!RegExp(`(?<=1)(?<!1)`+e)}catch{return!1}})(),N={codeRemoveIndent:/^(?: {0,3}\t| {1,4})/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,endingSpaceTabChar:/[ \t]$/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,leadingSpaceTab:/^[ \t]+/,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,numericCharacterReference:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));/,numericCharacterReferenceOrAmpersand:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:j(e=>RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:j(e=>RegExp(`^ {0,${e}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),fencesBeginRegex:j(e=>RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),headingBeginRegex:j(e=>RegExp(`^ {0,${e}}#`)),htmlBeginRegex:j(e=>RegExp(`^ {0,${e}}(?:</?(?:${wt})(?: +|$|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)`,`i`)),blockquoteBeginRegex:j(e=>RegExp(`^ {0,${e}}>`))},dt=/^(?:[ \t]*(?:\n|$))+/,ft=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,pt=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,mt=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,ht=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,P=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,gt=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_t=M(gt).replace(/bull/g,P).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,``).getRegex(),vt=M(gt).replace(/bull/g,P).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),yt=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,bt=/^[^\n]+/,xt=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,St=M(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,xt).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Ct=M(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,P).getRegex(),wt=`address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul`,F=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Tt=M(`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!(?:script|pre|style|textarea)(?![a-z0-9-]))([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))`,`i`).replace(`comment`,F).replace(`tag`,wt).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),I=e=>M(yt).replace(`hr`,mt).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,e).replace(`html`,` {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)`).replace(`tag`,wt).getRegex(),Et=I(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),L=I(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),Dt={blockquote:M(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,L).getRegex(),code:ft,def:St,fences:pt,heading:ht,hr:mt,html:Tt,lheading:_t,list:Ct,newline:dt,paragraph:Et,table:A,text:bt},Ot=M(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,mt).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3} )[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,` {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)`).replace(`tag`,wt).getRegex(),R={...Dt,lheading:vt,table:Ot,paragraph:M(yt).replace(`hr`,mt).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,Ot).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]`).replace(`html`,` {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)`).replace(`tag`,wt).getRegex()},kt={...Dt,html:M(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,F).replace(/tag/g,`(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b`).getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:A,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:M(yt).replace(`hr`,mt).replace(`heading`,` *#{1,6} *[^
4
4
  ]`).replace(`lheading`,_t).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).getRegex()},At=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,jt=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Mt=/^( {2,}|\\)\n(?!\s*$)[ \t]*/,z=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,B=/[\p{P}\p{S}]/u,V=/[\s\p{P}\p{S}]/u,Nt=/[^\s\p{P}\p{S}]/u,Pt=M(/^((?![*_])punctSpace)/,`u`).replace(/punctSpace/g,V).getRegex(),Ft=/[\p{Pi}\p{Ps}"']/u,It=/(?!~)[\p{P}\p{S}]/u,Lt=/(?!~)[\s\p{P}\p{S}]/u,Rt=/(?:[^\s\p{P}\p{S}]|~)/u,zt=M(/link|precode-code|html/,`g`).replace(`link`,/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace(`precode-`,ut?"(?<!`)()":"(^^|[^`])").replace(`code`,/(?<b>`+)[^`]+\k<b>(?!`)/).replace(`html`,/<(?! )[^<>]*?>/).getRegex(),Bt=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Vt=M(Bt,`u`).replace(/punct/g,B).getRegex(),Ht=M(Bt,`u`).replace(/punct/g,It).getRegex(),Ut=M(/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,`u`).replace(/openQuote/g,Ft).replace(/punct/g,B).getRegex(),Wt=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,Gt=M(Wt,`gu`).replace(/notPunctSpace/g,Nt).replace(/punctSpace/g,V).replace(/punct/g,B).getRegex(),Kt=M(Wt,`gu`).replace(/notPunctSpace/g,Rt).replace(/punctSpace/g,Lt).replace(/punct/g,It).getRegex(),qt=M(`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,Nt).replace(/punctSpace/g,V).replace(/punct/g,B).getRegex(),Jt=M(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,Nt).replace(/punctSpace/g,V).replace(/punct/g,B).getRegex(),Yt=M(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,Nt).replace(/punctSpace/g,V).replace(/punct/g,B).getRegex(),Xt=M(/^~~?(?:((?!~)punct)|[^\s~])/,`u`).replace(/punct/g,B).getRegex(),Zt=M(`^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,Nt).replace(/punctSpace/g,V).replace(/punct/g,B).getRegex(),Qt=M(/\\(punct)/,`gu`).replace(/punct/g,B).getRegex(),$t=M(/(`+)(?:[^`]|[^`][\s\S]*?[^`])\1(?!`)|`+|\\(punct)/,`gu`).replace(/punct/g,B).getRegex(),en=M(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace(`scheme`,/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace(`email`,/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),H=M(F).replace(`(?:-->|$)`,`-->`).getRegex(),tn=M(`^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>`).replace(`comment`,H).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),nn=/\[(?:\\[\s\S]|[^\[\]\\])*\]/,rn=M(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace(`brackets`,nn).getRegex(),an=M(/^!?\[(label)\]\([ \t\n]*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?[ \t\n]*\)/).replace(`label`,rn).replace(`href`,/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace(`title`,/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),on=M(/^!?\[(label)\]\[(ref)\]/).replace(`label`,rn).replace(`ref`,xt).getRegex(),sn=M(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,xt).getRegex(),cn=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/,ln=M(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace(`brackets`,nn).getRegex(),un=M(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,M(/^!?\[(label)\]\[(ref)\]/).replace(`label`,ln).replace(`ref`,cn).getRegex()).replace(`nolink`,M(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,cn).getRegex()).getRegex(),dn=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,fn=M(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g,/[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),U={_backpedal:A,anyPunctuation:Qt,anyPunctuationOutsideCode:$t,autolink:en,blockSkip:zt,br:Mt,code:jt,del:A,delLDelim:A,delRDelim:A,emStrongLDelim:Vt,emStrongRDelimAst:Gt,emStrongRDelimUnd:Jt,escape:At,link:an,nolink:sn,punctuation:Pt,reflink:on,reflinkSearch:un,tag:tn,text:z,url:A},pn={...U,emStrongLDelim:Ut,emStrongRDelimAst:qt,emStrongRDelimUnd:Yt,link:M(/^!?\[(label)\]\((.*?)\)/).replace(`label`,rn).getRegex(),reflink:M(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,rn).getRegex()},mn={...U,emStrongRDelimAst:Kt,emStrongLDelim:Ht,delLDelim:Xt,delRDelim:Zt,url:M(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace(`emailProtocol`,fn).replace(`protocol`,dn).replace(`email`,/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:M(/^(?:[^a-zA-Z0-9](?=emailProtocol)|(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9](?=emailProtocol)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))))/).replace(`protocol`,dn).replace(/emailProtocol/g,/(?:mailto|xmpp):/).getRegex()},hn={...mn,br:M(Mt).replace(`{2,}`,`*`).getRegex(),text:M(mn.text).replace(`\\b_`,`\\b_| {2,}\\n`).replace(/\{2,\}/g,`*`).getRegex()},gn={normal:Dt,gfm:R,pedantic:kt},_n={normal:U,gfm:mn,breaks:hn,pedantic:pn},vn={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`},yn=e=>vn[e];function W(e,t){if(t){if(N.escapeTest.test(e))return e.replace(N.escapeReplace,yn)}else if(N.escapeTestNoEncode.test(e))return e.replace(N.escapeReplaceNoEncode,yn);return e}function bn(e){return N.numericCharacterReference.test(e)?e.replace(N.numericCharacterReferenceOrAmpersand,(e,t,n)=>{if(t===void 0&&n===void 0)return`&amp;`;let r=t===void 0?Number.parseInt(n,16):Number.parseInt(t,10);return r===0||r>1114111||r>=55296&&r<=57343?`�`:r===38?`&amp;`:String.fromCodePoint(r)}):e}function xn(e){try{e=encodeURI(e).replace(N.percentDecode,`%`)}catch{return null}return e}function G(e,t){let n=e.replace(N.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(N.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t){if(n.length>t)n.splice(t);else for(;n.length<t;)n.push(``)}for(;r<n.length;r++)n[r]=n[r].trim().replace(N.slashPipe,`|`);return n}function K(e,t,n){let r=e.length;if(r===0)return``;let i=0;for(;i<r;){let a=e.charAt(r-i-1);if(a===t&&!n)i++;else if(a!==t&&n)i++;else break}return e.slice(0,r-i)}function Sn(e){let t=e.split(`
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{a as t,c as n,n as r,o as i,s as a,t as o}from"./maplibre-DN_v_fcJ.js";import{t as s}from"./jsx-runtime-NZYk81nU.js";var c=e(s(),1),l=({style:e,layers:s,position:l,zoom:u})=>(0,c.jsxs)(a,{mapLib:o,mapStyle:e,initialViewState:{...l,zoom:u},cooperativeGestures:!0,style:{width:`100%`,height:`100%`},children:[(0,c.jsx)(t,{showCompass:!1}),(0,c.jsx)(r,{layers:s}),(0,c.jsx)(i,{latitude:l.latitude,longitude:l.longitude,anchor:`bottom`,children:(0,c.jsx)(n,{"aria-hidden":!0,className:`size-8 fill-primary text-primary-foreground drop-shadow`,strokeWidth:1.5})})]});export{l as RecordMap};
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{a as t,c as n,n as r,o as i,s as a,t as o}from"./maplibre-BFMEpd4m.js";import{t as s}from"./jsx-runtime-NZYk81nU.js";var c=e(s(),1),l=({style:e,layers:s,position:l,zoom:u})=>(0,c.jsxs)(a,{mapLib:o,mapStyle:e,initialViewState:{...l,zoom:u},cooperativeGestures:!0,style:{width:`100%`,height:`100%`},children:[(0,c.jsx)(t,{showCompass:!1}),(0,c.jsx)(r,{layers:s}),(0,c.jsx)(i,{latitude:l.latitude,longitude:l.longitude,anchor:`bottom`,children:(0,c.jsx)(n,{"aria-hidden":!0,className:`size-8 fill-primary text-primary-foreground drop-shadow`,strokeWidth:1.5})})]});export{l as RecordMap};
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./react-Cvdyeg_0.js";import{dt as n,o as r}from"./app-wZRscg1o.js";import{a as i,c as a,i as o,n as s,o as c,r as l,s as u,t as d}from"./maplibre-DN_v_fcJ.js";import{t as f}from"./jsx-runtime-NZYk81nU.js";var p=e(t(),1),m=512,h=85.051129,g=16,_=Array.from({length:23},(e,t)=>t),v=e=>e.type===`LineString`?e.coordinates:e.type===`MultiPolygon`?e.coordinates.flat(2):e.coordinates.flat(),y=e=>{let t=Math.max(-85.051129,Math.min(h,e))*Math.PI/180;return .5-Math.log(Math.tan(Math.PI/4+t/2))/(2*Math.PI)},b=e=>{let t=v(e),n=t.map(([e])=>e),r=t.map(([,e])=>y(e)),i=(Math.max(...n)-Math.min(...n))/360*m,a=(Math.max(...r)-Math.min(...r))*m;return Math.max(i,a)},x=(e,t)=>{let n=e.flatMap(e=>{if(!e.area)return[];let n=e.area.type===`LineString`||e.area.type===`MultiLineString`?`line`:`polygon`;return[{type:`Feature`,geometry:e.area,properties:{key:e.key,kind:n,span:b(e.area),chosen:t?.includes(e.key)??!1}}]});return{type:`FeatureCollection`,features:[...n.filter(e=>!e.properties.chosen),...n.filter(e=>e.properties.chosen)]}},S=e=>[`interpolate`,[`linear`],[`zoom`],..._.flatMap(t=>[t,[`*`,e,[`min`,1,[`max`,0,[`/`,[`-`,[`*`,[`get`,`span`],2**t],g],32]]]]])],C=e(f(),1),w=`position-area-fills`,T=[`==`,[`get`,`kind`],`polygon`],E=[`==`,[`get`,`kind`],`line`],D=(e,t)=>[`case`,[`get`,`chosen`],e,t],O=({points:e,selected:t,colors:n})=>{let r=x(e,t);if(r.features.length===0)return null;let i=[`case`,[`get`,`chosen`],n.chosen,n.area];return(0,C.jsxs)(o,{id:`position-areas`,type:`geojson`,data:r,children:[(0,C.jsx)(l,{id:w,type:`fill`,filter:T,paint:{"fill-color":i,"fill-opacity":S(D(.15,.1))}}),(0,C.jsx)(l,{id:`position-area-outlines`,type:`line`,filter:T,paint:{"line-color":i,"line-width":1.5,"line-dasharray":[3,2],"line-opacity":S(.8)}}),(0,C.jsx)(l,{id:`position-area-lines`,type:`line`,filter:E,layout:{"line-cap":`round`,"line-join":`round`},paint:{"line-color":i,"line-width":6,"line-opacity":S(D(.6,.35))}})]})},k=(e,t)=>{let n=document.createElement(`span`);n.style.color=`var(${t})`,e.append(n);let r=getComputedStyle(n).color;n.remove();let i=document.createElement(`canvas`);i.width=1,i.height=1;let a=i.getContext(`2d`,{willReadFrequently:!0});if(!a)return r;a.fillStyle=r,a.fillRect(0,0,1,1);let[o,s,c,l]=a.getImageData(0,0,1,1).data;return`rgba(${o}, ${s}, ${c}, ${l/255})`},A=28,j={padding:48,maxZoom:15,duration:0},M={padding:48,maxZoom:16,duration:300},N=32,P=new Intl.NumberFormat(`en-IE`,{notation:`compact`,maximumFractionDigits:1}),F=e=>[[e.west,e.south],[e.east,e.north]],I=({style:e,layers:t,initial:o,points:l,buckets:f,fit:m,onFitted:h,onMove:g,selected:_,covered:v,onSelect:y,onClear:b,markerLabel:x,bucketLabel:S})=>{let T=(0,p.useRef)(null),[E,D]=(0,p.useState)([]),[I,L]=(0,p.useState)(),R=new globalThis.Map(l.map(e=>[e.key,e])),z=l.map(e=>e.key).join(`,`),B=m&&JSON.stringify(m),V=()=>{let e=T.current?.getMap();e&&D(r(l.map(t=>({key:t.key,...e.project([t.longitude,t.latitude])})),A))},H=()=>{let e=T.current?.getMap();if(!e)return;let t=e.getBounds(),n=e.getCenter();g({bounds:{south:t.getSouth(),west:t.getWest(),north:t.getNorth(),east:t.getEast()},zoom:e.getZoom()},{latitude:n.lat,longitude:n.lng,zoom:e.getZoom()})},U=()=>{let e=T.current?.getMap();e&&m&&(e.fitBounds(F(m),j),h(),H())};(0,p.useEffect)(V,[z]),(0,p.useEffect)(U,[B]);let W=E.find(e=>_!==void 0&&e.keys.some(e=>_.includes(e)))?.at;return(0,p.useEffect)(()=>{let e=T.current?.getMap(),t=W===void 0?void 0:R.get(W);if(!e||!t||v===0)return;let{y:n}=e.project([t.longitude,t.latitude]),r=e.getContainer().clientHeight-v;n>N&&n<r||e.easeTo({center:[t.longitude,t.latitude],offset:[0,(N-v)/2],duration:300})},[W,v]),(0,C.jsxs)(u,{ref:T,mapLib:d,mapStyle:e,initialViewState:o??{latitude:0,longitude:0,zoom:1},style:{width:`100%`,height:`100%`},onLoad:()=>{let e=T.current.getMap().getContainer();L({area:k(e,`--primary`),chosen:k(e,`--foreground`)}),V(),m?U():H()},onZoomEnd:V,onMoveEnd:H,onClick:b,children:[(0,C.jsx)(i,{showCompass:!1}),(0,C.jsx)(s,{layers:t,below:w}),I&&(0,C.jsx)(O,{points:l,selected:_,colors:I}),f.map(e=>(0,C.jsx)(c,{latitude:e.latitude,longitude:e.longitude,anchor:`center`,children:(0,C.jsx)(`button`,{type:`button`,"aria-label":S(e.count),className:`flex size-10 cursor-pointer items-center justify-center rounded-full border-2 border-background bg-primary text-xs font-semibold text-primary-foreground tabular-nums shadow`,onClick:t=>{t.stopPropagation(),T.current?.getMap().fitBounds(F(e.bounds),M)},children:P.format(e.count)})},`${e.latitude},${e.longitude}`)),E.map(e=>{let t=R.get(e.at);if(!t)return null;let r=_!==void 0&&e.keys.some(e=>_.includes(e)),i=e.keys.every(e=>R.get(e)?.approximate);return(0,C.jsx)(c,{latitude:t.latitude,longitude:t.longitude,anchor:`bottom`,style:{zIndex:+!!r},children:(0,C.jsxs)(`button`,{type:`button`,"aria-label":x(e.keys),"aria-pressed":r,className:`relative block cursor-pointer`,onClick:t=>{t.stopPropagation(),y(e.keys)},children:[(0,C.jsx)(a,{"aria-hidden":!0,"data-approximate":i||void 0,className:n(`size-8 drop-shadow`,i?r?`fill-background text-foreground`:`fill-background text-primary`:r?`fill-foreground text-background`:`fill-primary text-primary-foreground`),strokeWidth:i?2:1.5,strokeDasharray:i?`3 2`:void 0}),e.keys.length>1&&(0,C.jsx)(`span`,{className:`absolute -right-2 -top-1 min-w-5 rounded-full border border-background bg-foreground px-1 text-center text-[11px] font-medium leading-4 text-background tabular-nums`,children:e.keys.length})]})},e.at)})]})};export{I as RecordsMap};
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./react-Cvdyeg_0.js";import{dt as n,o as r}from"./app-BmBlR0fJ.js";import{a as i,c as a,i as o,n as s,o as c,r as l,s as u,t as d}from"./maplibre-BFMEpd4m.js";import{t as f}from"./jsx-runtime-NZYk81nU.js";var p=e(t(),1),m=512,h=85.051129,g=16,_=Array.from({length:23},(e,t)=>t),v=e=>e.type===`LineString`?e.coordinates:e.type===`MultiPolygon`?e.coordinates.flat(2):e.coordinates.flat(),y=e=>{let t=Math.max(-85.051129,Math.min(h,e))*Math.PI/180;return .5-Math.log(Math.tan(Math.PI/4+t/2))/(2*Math.PI)},b=e=>{let t=v(e),n=t.map(([e])=>e),r=t.map(([,e])=>y(e)),i=(Math.max(...n)-Math.min(...n))/360*m,a=(Math.max(...r)-Math.min(...r))*m;return Math.max(i,a)},x=(e,t)=>{let n=e.flatMap(e=>{if(!e.area)return[];let n=e.area.type===`LineString`||e.area.type===`MultiLineString`?`line`:`polygon`;return[{type:`Feature`,geometry:e.area,properties:{key:e.key,kind:n,span:b(e.area),chosen:t?.includes(e.key)??!1}}]});return{type:`FeatureCollection`,features:[...n.filter(e=>!e.properties.chosen),...n.filter(e=>e.properties.chosen)]}},S=e=>[`interpolate`,[`linear`],[`zoom`],..._.flatMap(t=>[t,[`*`,e,[`min`,1,[`max`,0,[`/`,[`-`,[`*`,[`get`,`span`],2**t],g],32]]]]])],C=e(f(),1),w=`position-area-fills`,T=[`==`,[`get`,`kind`],`polygon`],E=[`==`,[`get`,`kind`],`line`],D=(e,t)=>[`case`,[`get`,`chosen`],e,t],O=({points:e,selected:t,colors:n})=>{let r=x(e,t);if(r.features.length===0)return null;let i=[`case`,[`get`,`chosen`],n.chosen,n.area];return(0,C.jsxs)(o,{id:`position-areas`,type:`geojson`,data:r,children:[(0,C.jsx)(l,{id:w,type:`fill`,filter:T,paint:{"fill-color":i,"fill-opacity":S(D(.15,.1))}}),(0,C.jsx)(l,{id:`position-area-outlines`,type:`line`,filter:T,paint:{"line-color":i,"line-width":1.5,"line-dasharray":[3,2],"line-opacity":S(.8)}}),(0,C.jsx)(l,{id:`position-area-lines`,type:`line`,filter:E,layout:{"line-cap":`round`,"line-join":`round`},paint:{"line-color":i,"line-width":6,"line-opacity":S(D(.6,.35))}})]})},k=(e,t)=>{let n=document.createElement(`span`);n.style.color=`var(${t})`,e.append(n);let r=getComputedStyle(n).color;n.remove();let i=document.createElement(`canvas`);i.width=1,i.height=1;let a=i.getContext(`2d`,{willReadFrequently:!0});if(!a)return r;a.fillStyle=r,a.fillRect(0,0,1,1);let[o,s,c,l]=a.getImageData(0,0,1,1).data;return`rgba(${o}, ${s}, ${c}, ${l/255})`},A=28,j={padding:48,maxZoom:15,duration:0},M={padding:48,maxZoom:16,duration:300},N=32,P=new Intl.NumberFormat(`en-IE`,{notation:`compact`,maximumFractionDigits:1}),F=e=>[[e.west,e.south],[e.east,e.north]],I=({style:e,layers:t,initial:o,points:l,buckets:f,fit:m,onFitted:h,onMove:g,selected:_,covered:v,onSelect:y,onClear:b,markerLabel:x,bucketLabel:S})=>{let T=(0,p.useRef)(null),[E,D]=(0,p.useState)([]),[I,L]=(0,p.useState)(),R=new globalThis.Map(l.map(e=>[e.key,e])),z=l.map(e=>e.key).join(`,`),B=m&&JSON.stringify(m),V=()=>{let e=T.current?.getMap();e&&D(r(l.map(t=>({key:t.key,...e.project([t.longitude,t.latitude])})),A))},H=()=>{let e=T.current?.getMap();if(!e)return;let t=e.getBounds(),n=e.getCenter();g({bounds:{south:t.getSouth(),west:t.getWest(),north:t.getNorth(),east:t.getEast()},zoom:e.getZoom()},{latitude:n.lat,longitude:n.lng,zoom:e.getZoom()})},U=()=>{let e=T.current?.getMap();e&&m&&(e.fitBounds(F(m),j),h(),H())};(0,p.useEffect)(V,[z]),(0,p.useEffect)(U,[B]);let W=E.find(e=>_!==void 0&&e.keys.some(e=>_.includes(e)))?.at;return(0,p.useEffect)(()=>{let e=T.current?.getMap(),t=W===void 0?void 0:R.get(W);if(!e||!t||v===0)return;let{y:n}=e.project([t.longitude,t.latitude]),r=e.getContainer().clientHeight-v;n>N&&n<r||e.easeTo({center:[t.longitude,t.latitude],offset:[0,(N-v)/2],duration:300})},[W,v]),(0,C.jsxs)(u,{ref:T,mapLib:d,mapStyle:e,initialViewState:o??{latitude:0,longitude:0,zoom:1},style:{width:`100%`,height:`100%`},onLoad:()=>{let e=T.current.getMap().getContainer();L({area:k(e,`--primary`),chosen:k(e,`--foreground`)}),V(),m?U():H()},onZoomEnd:V,onMoveEnd:H,onClick:b,children:[(0,C.jsx)(i,{showCompass:!1}),(0,C.jsx)(s,{layers:t,below:w}),I&&(0,C.jsx)(O,{points:l,selected:_,colors:I}),f.map(e=>(0,C.jsx)(c,{latitude:e.latitude,longitude:e.longitude,anchor:`center`,children:(0,C.jsx)(`button`,{type:`button`,"aria-label":S(e.count),className:`flex size-10 cursor-pointer items-center justify-center rounded-full border-2 border-background bg-primary text-xs font-semibold text-primary-foreground tabular-nums shadow`,onClick:t=>{t.stopPropagation(),T.current?.getMap().fitBounds(F(e.bounds),M)},children:P.format(e.count)})},`${e.latitude},${e.longitude}`)),E.map(e=>{let t=R.get(e.at);if(!t)return null;let r=_!==void 0&&e.keys.some(e=>_.includes(e)),i=e.keys.every(e=>R.get(e)?.approximate);return(0,C.jsx)(c,{latitude:t.latitude,longitude:t.longitude,anchor:`bottom`,style:{zIndex:+!!r},children:(0,C.jsxs)(`button`,{type:`button`,"aria-label":x(e.keys),"aria-pressed":r,className:`relative block cursor-pointer`,onClick:t=>{t.stopPropagation(),y(e.keys)},children:[(0,C.jsx)(a,{"aria-hidden":!0,"data-approximate":i||void 0,className:n(`size-8 drop-shadow`,i?r?`fill-background text-foreground`:`fill-background text-primary`:r?`fill-foreground text-background`:`fill-primary text-primary-foreground`),strokeWidth:i?2:1.5,strokeDasharray:i?`3 2`:void 0}),e.keys.length>1&&(0,C.jsx)(`span`,{className:`absolute -right-2 -top-1 min-w-5 rounded-full border border-background bg-foreground px-1 text-center text-[11px] font-medium leading-4 text-background tabular-nums`,children:e.keys.length})]})},e.at)})]})};export{I as RecordsMap};
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{$ as t,A as n,B as r,C as i,D as a,E as o,F as s,G as ee,H as c,I as te,K as ne,L as l,M as u,N as d,O as f,P as p,Q as m,R as h,S as g,T as _,U as v,V as y,W as b,X as x,Y as S,Z as C,_ as w,a as T,at as E,b as D,c as O,d as k,dt as A,et as j,f as M,g as N,h as P,i as F,it as I,j as L,k as R,l as z,lt as B,m as V,n as H,nt as U,ot as W,p as G,q as K,r as q,rt as J,s as Y,st as X,t as Z,tt as re,u as ie,ut as ae,v as oe,w as se,x as Q,y as ce,z as le}from"./app-wZRscg1o.js";import{t as ue}from"./jsx-runtime-NZYk81nU.js";var $=e(ue(),1),de=({row:e,resource:t,recordKey:n,...r})=>{let i=O(),a=G(),o=t??i?.resource??a?.model.name;if(o===void 0)throw Error(`RecordLink needs a resource outside a list display or a record`);return(0,$.jsx)(N,{to:{kind:`record`,resource:o,key:e?e.key:n},...r})},fe=({name:e,label:t,options:n,value:r,onChange:i})=>(0,$.jsx)(`div`,{role:`radiogroup`,"aria-label":t,className:`flex flex-col gap-2`,children:n.map(t=>(0,$.jsxs)(`label`,{className:A(`block rounded-lg border p-3 transition-colors has-[:focus-visible]:outline-2 has-[:focus-visible]:outline-offset-2 has-[:focus-visible]:outline-primary`,t.disabled?`cursor-default bg-background opacity-60`:t.value===r?`cursor-pointer border-primary bg-primary-soft`:`cursor-pointer bg-background hover:bg-surface`),children:[(0,$.jsx)(`input`,{type:`radio`,name:e,value:t.value,checked:t.value===r,disabled:t.disabled,onChange:()=>i(t.value),className:`sr-only`}),(0,$.jsx)(`span`,{className:A(`block font-medium`,t.value===r&&`text-primary-text`),children:t.label}),t.description&&(0,$.jsx)(`span`,{className:`mt-0.5 block text-xs leading-snug text-muted-foreground`,children:t.description})]},t.value))});export{te as ActionCard,V as ActionInputError,m as ApiProvider,Z as App,N as AppLink,_ as AssistantDock,C as AuthLayout,J as Button,r as ChatMessage,le as ChatThread,fe as Choices,S as CodeForm,p as CompactTable,h as Composer,U as Dialog,L as DiffView,D as Field,s as FieldList,F as Form,W as Input,ae as LogoMark,T as MenuSelect,re as OtpInput,a as PartView,de as RecordLink,x as ResendCodeButton,Q as ResponsiveDialog,ce as Section,B as Segmented,l as SidePanel,z as SignInPrompt,E as Spinner,n as StepList,oe as Textarea,I as buttonClass,f as definePlugin,R as defineUi,u as diffStats,H as isConflict,ne as mergeUi,d as parseDiff,v as pluginApi,b as protobaseVersion,K as uiFromModule,c as useApiToken,w as useAppAddress,se as useAssistant,i as useAssistantClient,o as useBackendData,t as useClient,ie as useFacets,X as useFieldControl,k as useHistogram,G as useLayoutRecord,P as useList,Y as useListDisplay,g as useMeta,ee as usePlugin,y as useRecord,j as useResourceClient,M as useSeries,q as useUpdateRecord};
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{$ as t,A as n,B as r,C as i,D as a,E as o,F as s,G as ee,H as c,I as te,K as ne,L as l,M as u,N as d,O as f,P as p,Q as m,R as h,S as g,T as _,U as v,V as y,W as b,X as x,Y as S,Z as C,_ as w,a as T,at as E,b as D,c as O,d as k,dt as A,et as j,f as M,g as N,h as P,i as F,it as I,j as L,k as R,l as z,lt as B,m as V,n as H,nt as U,ot as W,p as G,q as K,r as q,rt as J,s as Y,st as X,t as Z,tt as re,u as ie,ut as ae,v as oe,w as se,x as Q,y as ce,z as le}from"./app-BmBlR0fJ.js";import{t as ue}from"./jsx-runtime-NZYk81nU.js";var $=e(ue(),1),de=({row:e,resource:t,recordKey:n,...r})=>{let i=O(),a=G(),o=t??i?.resource??a?.model.name;if(o===void 0)throw Error(`RecordLink needs a resource outside a list display or a record`);return(0,$.jsx)(N,{to:{kind:`record`,resource:o,key:e?e.key:n},...r})},fe=({name:e,label:t,options:n,value:r,onChange:i})=>(0,$.jsx)(`div`,{role:`radiogroup`,"aria-label":t,className:`flex flex-col gap-2`,children:n.map(t=>(0,$.jsxs)(`label`,{className:A(`block rounded-lg border p-3 transition-colors has-[:focus-visible]:outline-2 has-[:focus-visible]:outline-offset-2 has-[:focus-visible]:outline-primary`,t.disabled?`cursor-default bg-background opacity-60`:t.value===r?`cursor-pointer border-primary bg-primary-soft`:`cursor-pointer bg-background hover:bg-surface`),children:[(0,$.jsx)(`input`,{type:`radio`,name:e,value:t.value,checked:t.value===r,disabled:t.disabled,onChange:()=>i(t.value),className:`sr-only`}),(0,$.jsx)(`span`,{className:A(`block font-medium`,t.value===r&&`text-primary-text`),children:t.label}),t.description&&(0,$.jsx)(`span`,{className:`mt-0.5 block text-xs leading-snug text-muted-foreground`,children:t.description})]},t.value))});export{te as ActionCard,V as ActionInputError,m as ApiProvider,Z as App,N as AppLink,_ as AssistantDock,C as AuthLayout,J as Button,r as ChatMessage,le as ChatThread,fe as Choices,S as CodeForm,p as CompactTable,h as Composer,U as Dialog,L as DiffView,D as Field,s as FieldList,F as Form,W as Input,ae as LogoMark,T as MenuSelect,re as OtpInput,a as PartView,de as RecordLink,x as ResendCodeButton,Q as ResponsiveDialog,ce as Section,B as Segmented,l as SidePanel,z as SignInPrompt,E as Spinner,n as StepList,oe as Textarea,I as buttonClass,f as definePlugin,R as defineUi,u as diffStats,H as isConflict,ne as mergeUi,d as parseDiff,v as pluginApi,b as protobaseVersion,K as uiFromModule,c as useApiToken,w as useAppAddress,se as useAssistant,i as useAssistantClient,o as useBackendData,t as useClient,ie as useFacets,X as useFieldControl,k as useHistogram,G as useLayoutRecord,P as useList,Y as useListDisplay,g as useMeta,ee as usePlugin,y as useRecord,j as useResourceClient,M as useSeries,q as useUpdateRecord};
@@ -16,13 +16,13 @@
16
16
  }
17
17
  document.documentElement.dataset.theme = stored === 'light' || stored === 'dark' ? stored : matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'
18
18
  </script>
19
- <script type="importmap">{"imports":{"react":"/assets/shared-react-DhkZ2M4l.js","react/jsx-runtime":"/assets/shared-react-jsx-runtime-xPQrWk0g.js","react-dom":"/assets/shared-react-dom-D508a1cq.js","@protobase/ui":"/assets/shared-protobase-ui-DWCBNg3c.js"}}</script>
20
- <script type="module" crossorigin src="/assets/index-RHKnIOOP.js"></script>
19
+ <script type="importmap">{"imports":{"react":"/assets/shared-react-DhkZ2M4l.js","react/jsx-runtime":"/assets/shared-react-jsx-runtime-xPQrWk0g.js","react-dom":"/assets/shared-react-dom-D508a1cq.js","@protobase/ui":"/assets/shared-protobase-ui-DfPkkHCn.js"}}</script>
20
+ <script type="module" crossorigin src="/assets/index-BMiDZRGI.js"></script>
21
21
  <link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-hePW80VL.js">
22
22
  <link rel="modulepreload" crossorigin href="/assets/react-Cvdyeg_0.js">
23
23
  <link rel="modulepreload" crossorigin href="/assets/react-dom-B-VxWsjA.js">
24
24
  <link rel="modulepreload" crossorigin href="/assets/jsx-runtime-NZYk81nU.js">
25
- <link rel="modulepreload" crossorigin href="/assets/app-wZRscg1o.js">
25
+ <link rel="modulepreload" crossorigin href="/assets/app-BmBlR0fJ.js">
26
26
  <link rel="stylesheet" crossorigin href="/assets/app-GUjJKojE.css">
27
27
  <link rel="stylesheet" crossorigin href="/assets/index-C1fzTv_X.css">
28
28
  <link rel="stylesheet" href="/protobase.theme.css">
@@ -1,5 +1,5 @@
1
1
  {
2
- "protobase": "0.21.3",
2
+ "protobase": "0.21.5",
3
3
  "pluginApi": 1,
4
4
  "paths": [
5
5
  "/index.html",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@protobase/ui",
3
- "version": "0.21.3",
3
+ "version": "0.21.5",
4
4
  "description": "The Protobase admin app and the React hooks and components for custom UI.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -39,9 +39,9 @@
39
39
  "dependencies": {
40
40
  "@dnd-kit/core": "^6.3.1",
41
41
  "@dnd-kit/sortable": "^10.0.0",
42
- "@protobase/client": "0.21.3",
43
- "@protobase/layout": "0.21.3",
44
- "@protobase/schema": "0.21.3",
42
+ "@protobase/client": "0.21.5",
43
+ "@protobase/layout": "0.21.5",
44
+ "@protobase/schema": "0.21.5",
45
45
  "@sentry/browser": "^11.7.0",
46
46
  "@tanstack/react-query": "^5.104.1",
47
47
  "@tanstack/react-table": "^9.2.6",