@arcgis/portal-components 5.2.0-next.140 → 5.2.0-next.142
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/dist/cdn/{Z6R3C4AK.js → 23X56P4K.js} +2 -2
- package/dist/cdn/{VDXESPJK.js → 25XJ66JO.js} +2 -2
- package/dist/cdn/2A4BYZOS.js +2 -0
- package/dist/cdn/{EMJQI4MA.js → 2GBRZSEC.js} +1 -1
- package/dist/cdn/{LISDTBEX.js → 2I5SLQC5.js} +2 -2
- package/dist/cdn/{ZKZDKJ6D.js → 3R4PPD5N.js} +2 -2
- package/dist/cdn/3SO52LKS.js +2 -0
- package/dist/cdn/{SGDDFWCJ.js → 456JKNCU.js} +2 -2
- package/dist/cdn/{32BWFMTC.js → 47PU5HDG.js} +2 -2
- package/dist/cdn/{3CQKCUM5.js → 4SHXR62X.js} +2 -2
- package/dist/cdn/{ABORO35R.js → 4TQWZ2KF.js} +2 -2
- package/dist/cdn/{L64UURQB.js → 4ZTWQN6Q.js} +2 -2
- package/dist/cdn/{4TSXFX3M.js → 55FL7WQV.js} +2 -2
- package/dist/cdn/{ZDDN7UKS.js → 5EFYJYWM.js} +1 -1
- package/dist/cdn/{3EYB5GQX.js → 5FDUO7J4.js} +2 -2
- package/dist/cdn/{FIQZPIIK.js → 5FOWUL6I.js} +2 -2
- package/dist/cdn/{DAAON2UO.js → 5YDITHQA.js} +1 -1
- package/dist/cdn/{K2XSYDAP.js → 6BMWSGLA.js} +2 -2
- package/dist/cdn/6EE4B3MI.js +2 -0
- package/dist/cdn/{JIJO4CAS.js → 6EY5GHKE.js} +2 -2
- package/dist/cdn/6KVA4AKM.js +2 -0
- package/dist/cdn/6LST5YZY.js +2 -0
- package/dist/cdn/{JN23JH3T.js → 6MWSS5YF.js} +2 -2
- package/dist/cdn/{V6A6MKLU.js → 6TO2BYXU.js} +1 -1
- package/dist/cdn/{GSOBDGLK.js → 7NK6UF47.js} +2 -2
- package/dist/cdn/{I273CANO.js → 7NQY5QJK.js} +2 -2
- package/dist/cdn/7TGCBYRK.js +2 -0
- package/dist/cdn/ADSPENPN.js +2 -0
- package/dist/cdn/{I6IRHXWR.js → ADZAKBOJ.js} +2 -2
- package/dist/cdn/{TLM457Z5.js → AE574B3G.js} +2 -2
- package/dist/cdn/{CXXV6WJT.js → AXNTYD46.js} +2 -2
- package/dist/cdn/{OD5WXP7J.js → B3NVWHCS.js} +2 -2
- package/dist/cdn/B4YHTYJB.js +2 -0
- package/dist/cdn/{PNIFJ5DQ.js → BIXJGL7B.js} +1 -1
- package/dist/cdn/{OXPXXIWL.js → BRJE3G3H.js} +2 -2
- package/dist/cdn/{A2SQ4EMZ.js → C5U7YKVI.js} +2 -2
- package/dist/cdn/C5VUNN4M.js +2 -0
- package/dist/cdn/{PKA745KL.js → CFBSBZSS.js} +1 -1
- package/dist/cdn/{7LMZHJZG.js → CVOWIH4J.js} +2 -2
- package/dist/cdn/{AICPYLWE.js → CWSEBETE.js} +3 -3
- package/dist/cdn/{DLI4XKJ3.js → D6QHNXEH.js} +2 -2
- package/dist/cdn/{YZTBAUIO.js → D7LRCAK4.js} +2 -2
- package/dist/cdn/DF5GVVDW.js +2 -0
- package/dist/cdn/{BKD7JSV2.js → DIKRXF22.js} +2 -2
- package/dist/cdn/{DDBXEXOV.js → DKIYHE4A.js} +2 -2
- package/dist/cdn/{GX7U3727.js → E3FQ4QWE.js} +2 -2
- package/dist/cdn/EJN2JQOX.js +2 -0
- package/dist/cdn/{ROX3GKKA.js → F3ODJVJC.js} +1 -1
- package/dist/cdn/{4QFTKB6T.js → FFLIAQOL.js} +2 -2
- package/dist/cdn/FQOOFBPI.js +2 -0
- package/dist/cdn/FQYC25GN.js +2 -0
- package/dist/cdn/{3LEQ37YT.js → FSACXOM3.js} +2 -2
- package/dist/cdn/{APSYZEPP.js → FTKD53UG.js} +2 -2
- package/dist/cdn/G6WPLOLV.js +2 -0
- package/dist/cdn/{TNUCSWBN.js → GEZH4D32.js} +2 -2
- package/dist/cdn/{5C5GHX4D.js → GTZ4LKEQ.js} +2 -2
- package/dist/cdn/{4KTRAA2J.js → ILDTKRON.js} +1 -1
- package/dist/cdn/{YTODQCOG.js → IXSEMBHA.js} +2 -2
- package/dist/cdn/{3NSHGKZA.js → JUDF3TYJ.js} +2 -2
- package/dist/cdn/KC4FTTKP.js +2 -0
- package/dist/cdn/{OR6T5SB3.js → KIKEE2KY.js} +2 -2
- package/dist/cdn/KOLH76KG.js +2 -0
- package/dist/cdn/{AXOBMX3S.js → KYNL256E.js} +2 -2
- package/dist/cdn/{5HZNBMW6.js → LNWWUPFK.js} +2 -2
- package/dist/cdn/{SVROAT3Z.js → LP4IB3PV.js} +2 -2
- package/dist/cdn/LRHPL6B5.js +2 -0
- package/dist/cdn/M6BRGNH3.js +2 -0
- package/dist/cdn/{LWFACY3F.js → MCX22B23.js} +2 -2
- package/dist/cdn/MHNYLHFR.js +2 -0
- package/dist/cdn/{GAF4YT5N.js → MQISQ7P3.js} +2 -2
- package/dist/cdn/MY7AYBBR.js +2 -0
- package/dist/cdn/{JPUUMGX5.js → NDRCB2K3.js} +2 -2
- package/dist/cdn/{NWVLGU2C.js → NICTB76A.js} +2 -2
- package/dist/cdn/{MKSFNVXL.js → NXFE6R2N.js} +2 -2
- package/dist/cdn/{CD5UWSCP.js → O5LFDRK2.js} +2 -2
- package/dist/cdn/{TOICLGFK.js → OJNU7H3F.js} +2 -2
- package/dist/cdn/{IN4JPZTY.js → OQGUCK3G.js} +2 -2
- package/dist/cdn/{PMRFXB4F.js → OUFIJDIW.js} +2 -2
- package/dist/cdn/{TWCJJCPC.js → OV5O7YP4.js} +2 -2
- package/dist/cdn/{TGCJUIEL.js → Q75EBGI2.js} +1 -1
- package/dist/cdn/QBV7VDQK.js +2 -0
- package/dist/cdn/QCOJMMT3.js +2 -0
- package/dist/cdn/{JOUR2FB2.js → QDWOQBO3.js} +2 -2
- package/dist/cdn/{4PRXQFCV.js → QKBGX2OY.js} +2 -2
- package/dist/cdn/{LYLQCBVX.js → QKK6N2AN.js} +2 -2
- package/dist/cdn/{N5QLV56W.js → QNCMFQSA.js} +2 -2
- package/dist/cdn/{KV4ZZSNW.js → QS3GXAIH.js} +1 -1
- package/dist/cdn/{JWBUJT43.js → QSAZVVVL.js} +2 -2
- package/dist/cdn/{DHMNNIXZ.js → QUOPWSRC.js} +2 -2
- package/dist/cdn/QYMSY57N.js +2 -0
- package/dist/cdn/{TXC7YBGL.js → R3QN5WF2.js} +2 -2
- package/dist/cdn/R57DISOR.js +2 -0
- package/dist/cdn/{OUMTV5H5.js → R74ZHFA6.js} +1 -1
- package/dist/cdn/{RQYNPDN3.js → RBGARTND.js} +2 -2
- package/dist/cdn/{TOTWYGB3.js → RUB2GDBE.js} +2 -2
- package/dist/cdn/{PZDI5ZDC.js → SG7Z5VLB.js} +2 -2
- package/dist/cdn/{TUUUK3VX.js → T2HQNZ36.js} +2 -2
- package/dist/cdn/{TBZXKKGP.js → T3RJKB2A.js} +2 -2
- package/dist/cdn/{XYMBRPC7.js → TJYPEMON.js} +2 -2
- package/dist/cdn/{2YZWRFCI.js → UGRFT75G.js} +2 -2
- package/dist/cdn/UKHCSMA4.js +2 -0
- package/dist/cdn/{74T6IXSN.js → UQKT5JQZ.js} +2 -2
- package/dist/cdn/{U3KMGSVH.js → USGROSML.js} +2 -2
- package/dist/cdn/{FRE56NBG.js → UTA2UBBS.js} +2 -2
- package/dist/cdn/{4MUB6TL6.js → UZCHLKLO.js} +1 -1
- package/dist/cdn/{5PV2GUZW.js → UZLQALHY.js} +1 -1
- package/dist/cdn/{M5PPX4ZX.js → V5YXPHYD.js} +2 -2
- package/dist/cdn/{K75JTQPW.js → VMQIDO4Z.js} +2 -2
- package/dist/cdn/{EQDYQOOT.js → WDMNL6PJ.js} +2 -2
- package/dist/cdn/{GUL7EIJ4.js → XEK22IDA.js} +1 -1
- package/dist/cdn/{RHCRPJWS.js → XKC6SPS4.js} +2 -2
- package/dist/cdn/XNEYNX5G.js +2 -0
- package/dist/cdn/{MLYQGIJU.js → XOFCMJBQ.js} +2 -2
- package/dist/cdn/XUPYBBRI.js +2 -0
- package/dist/cdn/{GUO7HKSP.js → Y3YIMI2Z.js} +4 -4
- package/dist/cdn/{3UFTKKFG.js → YUQFNMEZ.js} +1 -1
- package/dist/cdn/{YG6ZGQ46.js → YVKSTDL6.js} +1 -1
- package/dist/cdn/ZAIRH5DL.js +2 -0
- package/dist/cdn/{24QSQLRY.js → ZSILF72K.js} +2 -2
- package/dist/cdn/index.js +2 -2
- package/dist/chunks/common.js +1 -1
- package/dist/chunks/dom.js +1 -1
- package/dist/chunks/fieldAddDelete.js +1 -1
- package/dist/chunks/functional.js +1 -1
- package/dist/chunks/functionalities.js +1 -1
- package/dist/chunks/groups.js +1 -1
- package/dist/chunks/groups2.js +1 -1
- package/dist/chunks/icons.js +1 -1
- package/dist/chunks/info.js +1 -1
- package/dist/chunks/item.js +1 -1
- package/dist/chunks/item2.js +1 -1
- package/dist/chunks/itemThumbnail.js +1 -1
- package/dist/chunks/items.js +1 -1
- package/dist/chunks/loadClassificationData.js +1 -1
- package/dist/chunks/portal-account-switcher.js +1 -1
- package/dist/chunks/portal-browser-filter-date.js +1 -1
- package/dist/chunks/portal-browser.js +1 -1
- package/dist/chunks/portal-delete-items-review.js +1 -1
- package/dist/chunks/portal-item-badge.js +1 -1
- package/dist/chunks/portal-related-items-list-item.js +1 -1
- package/dist/chunks/portal.js +1 -1
- package/dist/chunks/portal2.js +1 -1
- package/dist/chunks/query.js +1 -1
- package/dist/chunks/request.js +1 -1
- package/dist/chunks/requests.js +1 -1
- package/dist/chunks/runtime.js +2 -2
- package/dist/chunks/services.js +1 -1
- package/dist/chunks/store.js +1 -1
- package/dist/chunks/string.js +1 -1
- package/dist/chunks/ui.js +1 -1
- package/dist/chunks/url.js +1 -1
- package/dist/chunks/useT9n.js +1 -1
- package/dist/chunks/user.js +1 -1
- package/dist/chunks/user2.js +1 -1
- package/dist/chunks/users.js +1 -1
- package/dist/chunks/utils.js +1 -1
- package/dist/chunks/utils2.js +1 -1
- package/dist/chunks/utils3.js +1 -1
- package/dist/chunks/verified.js +1 -1
- package/dist/components/arcgis-portal-account-switcher/customElement.d.ts +4 -1
- package/dist/components/arcgis-portal-account-switcher/customElement.js +87 -85
- package/dist/components/arcgis-portal-account-switcher-accounts/customElement.d.ts +4 -4
- package/dist/components/arcgis-portal-account-switcher-accounts/customElement.js +9 -9
- package/dist/components/arcgis-portal-account-switcher-list/customElement.d.ts +4 -4
- package/dist/components/arcgis-portal-account-switcher-list/customElement.js +7 -7
- package/dist/components/arcgis-portal-account-switcher-signout/customElement.d.ts +5 -5
- package/dist/components/arcgis-portal-account-switcher-signout/customElement.js +4 -4
- package/dist/components/arcgis-portal-add-gps-metadata/customElement.js +1 -1
- package/dist/components/arcgis-portal-ai-assistant/customElement.js +1 -1
- package/dist/components/arcgis-portal-ai-assistant-interrupt/customElement.js +1 -1
- package/dist/components/arcgis-portal-browser/customElement.js +1 -1
- package/dist/components/arcgis-portal-browser-actions/customElement.js +1 -1
- package/dist/components/arcgis-portal-browser-filter-status/customElement.js +1 -1
- package/dist/components/arcgis-portal-browser-pagination/customElement.js +1 -1
- package/dist/components/arcgis-portal-browser-search/customElement.js +1 -1
- package/dist/components/arcgis-portal-browser-sort/customElement.js +1 -1
- package/dist/components/arcgis-portal-browser-top-bar/customElement.js +1 -1
- package/dist/components/arcgis-portal-browser-view/customElement.js +1 -1
- package/dist/components/arcgis-portal-classification-banner/customElement.js +1 -1
- package/dist/components/arcgis-portal-classification-config/customElement.js +1 -1
- package/dist/components/arcgis-portal-classification-favorite/customElement.js +1 -1
- package/dist/components/arcgis-portal-classification-form-element/customElement.js +1 -1
- package/dist/components/arcgis-portal-delete-items/customElement.js +1 -1
- package/dist/components/arcgis-portal-delete-items-review/customElement.js +1 -1
- package/dist/components/arcgis-portal-entity-picker/customElement.js +1 -1
- package/dist/components/arcgis-portal-extent-picker/customElement.js +1 -1
- package/dist/components/arcgis-portal-extent-picker-coord-field/customElement.js +1 -1
- package/dist/components/arcgis-portal-field-delete/customElement.js +1 -1
- package/dist/components/arcgis-portal-group-badges/customElement.js +1 -1
- package/dist/components/arcgis-portal-group-browser/customElement.js +1 -1
- package/dist/components/arcgis-portal-group-browser-card/customElement.js +1 -1
- package/dist/components/arcgis-portal-group-browser-preview/customElement.js +1 -1
- package/dist/components/arcgis-portal-group-browser-preview-card/customElement.js +1 -1
- package/dist/components/arcgis-portal-group-card/customElement.js +17 -17
- package/dist/components/arcgis-portal-group-picker/customElement.js +1 -1
- package/dist/components/arcgis-portal-group-thumbnail/customElement.js +1 -1
- package/dist/components/arcgis-portal-info-banner/customElement.js +1 -1
- package/dist/components/arcgis-portal-item-actions/customElement.js +1 -1
- package/dist/components/arcgis-portal-item-badge/customElement.js +1 -1
- package/dist/components/arcgis-portal-item-badges/customElement.js +1 -1
- package/dist/components/arcgis-portal-item-card/customElement.js +59 -59
- package/dist/components/arcgis-portal-item-favorite/customElement.js +1 -1
- package/dist/components/arcgis-portal-item-picker/customElement.js +1 -1
- package/dist/components/arcgis-portal-item-thumbnail/customElement.js +1 -1
- package/dist/components/arcgis-portal-item-type/customElement.js +1 -1
- package/dist/components/arcgis-portal-mentionable-text-area/customElement.js +1 -1
- package/dist/components/arcgis-portal-navigation/customElement.js +1 -1
- package/dist/components/arcgis-portal-navigation/index.js +4 -4
- package/dist/components/arcgis-portal-replacement-item-redirect/customElement.js +1 -1
- package/dist/components/arcgis-portal-review-related-items/customElement.js +1 -1
- package/dist/components/arcgis-portal-sublayer-type/customElement.js +1 -1
- package/dist/components/arcgis-portal-user-avatar/customElement.js +1 -1
- package/dist/components/arcgis-portal-user-picker/customElement.js +1 -1
- package/dist/components/arcgis-portal-user-popup/customElement.js +1 -1
- package/dist/components/arcgis-portal-voice-input/customElement.js +1 -1
- package/dist/components/portal-browser/components/portal-browser-filter/customElement.js +1 -1
- package/dist/components/portal-browser/components/portal-browser-filter-date/customElement.js +1 -1
- package/dist/components/portal-browser/components/portal-browser-filters/customElement.js +1 -1
- package/dist/components/portal-group-browser-filters/customElement.js +1 -1
- package/dist/components/portal-group-browser-pagination/customElement.js +1 -1
- package/dist/components/portal-group-browser-sort/customElement.js +1 -1
- package/dist/components/portal-related-items-list-item/customElement.js +1 -1
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/index.js +1 -1
- package/dist/loader.js +1 -1
- package/dist/types/lumina.d.ts +6 -6
- package/dist/types/preact.d.ts +6 -6
- package/dist/types/react.d.ts +6 -6
- package/dist/types/stencil.d.ts +6 -6
- package/package.json +7 -7
- package/dist/cdn/23FS4XTG.js +0 -2
- package/dist/cdn/2MPQ5IWJ.js +0 -2
- package/dist/cdn/46BUEBWS.js +0 -2
- package/dist/cdn/4AI52H7C.js +0 -2
- package/dist/cdn/5PPZNVWG.js +0 -2
- package/dist/cdn/66XWNGQ2.js +0 -2
- package/dist/cdn/6F4SJDRR.js +0 -2
- package/dist/cdn/7ZWYUHGK.js +0 -2
- package/dist/cdn/AJQT7UXB.js +0 -2
- package/dist/cdn/AZOJHVAO.js +0 -2
- package/dist/cdn/BSTA5KI5.js +0 -2
- package/dist/cdn/DYO5P3F2.js +0 -2
- package/dist/cdn/E3INH2O6.js +0 -2
- package/dist/cdn/E66BDC6N.js +0 -2
- package/dist/cdn/EEAVX4PP.js +0 -2
- package/dist/cdn/EITRZQSC.js +0 -2
- package/dist/cdn/FIBQAMJ3.js +0 -2
- package/dist/cdn/FNLBJ4ZQ.js +0 -2
- package/dist/cdn/GXM3XY3J.js +0 -2
- package/dist/cdn/I6NVKNZJ.js +0 -2
- package/dist/cdn/J5FKIZAM.js +0 -2
- package/dist/cdn/JL52W3Z4.js +0 -2
- package/dist/cdn/N4VOTJ25.js +0 -2
- package/dist/cdn/NRMQDCM3.js +0 -2
- package/dist/cdn/RVYSVTPQ.js +0 -2
- package/dist/cdn/SLQQ44IA.js +0 -2
- package/dist/cdn/WC3FPLYQ.js +0 -2
- package/dist/cdn/YYTEJVBL.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import{d as g}from"./VDXESPJK.js";import a from"./RHCRPJWS.js";import{c as $}from"./EMJQI4MA.js";import{a as F}from"./7ZWYUHGK.js";import{J as x,K as b,L as _,M as s,N as v,R as y,h as u,j as o,w as p}from"./AICPYLWE.js";export default $arcgis.t(([{watch:l},h,{substitute:B},{a:k,b:S,c:R,d:P}])=>{var U=u`:host{position:relative;display:flex;height:100%;flex-direction:column;overflow-y:auto;overflow-x:hidden;background-color:var(--calcite-color-background);--arcgis-browser-max-width: 100%;--arcgis-browser-pane-width: 18.75rem;--arcgis-browser-pane-z-index: 11;container-type:inline-size;container-name:portal-browser}:host([height="auto"]){height:auto;min-height:100%;flex:1 1 100%}.wrapper{display:flex;height:100%;flex-direction:column;overflow:hidden}.wrapper--fixed{overflow:hidden}.wrapper--auto{flex:1 1 100%}.wrapper--full{transform:translate(0)}.panel{display:flex;height:100%;flex-direction:column;overflow:hidden}.panel--fixed{transform:translateZ(0)}.top-bar{position:sticky;top:0;right:0;left:0;z-index:20;flex-shrink:0;flex-grow:0;border-bottom:1px solid var(--calcite-color-border-3)}.scrolling{position:relative;display:flex;min-height:0px;width:100%;flex:1 1 0%;flex-direction:column}.scrolling--panel{overflow-y:scroll}@supports (scrollbar-gutter: stable){.scrolling--panel{scrollbar-gutter:stable;overflow-y:auto}}.scrolling--full{overflow:hidden}.preview-position{position:absolute;inset:0;margin-inline:auto;width:100%;max-width:var(--arcgis-browser-max-width)}.preview-position--with-top-bar{top:3rem}.preview-desktop{width:100%}.two-up{margin-left:auto;margin-right:auto;display:flex;width:100%;flex:1 1 auto;flex-direction:row;max-width:var(--arcgis-browser-max-width)}.two-up.small{margin-top:-1px}.two-up--fullscreen{height:100%;overflow:hidden}.content__start{margin-inline-end:.25rem;padding-inline:1rem}.content{position:relative;display:flex;min-width:0px;flex:1 1 0%;flex-direction:column;overflow:hidden}.content--full{overflow-y:scroll}@supports (scrollbar-gutter: stable){.content--full{scrollbar-gutter:stable;overflow-y:auto}}.content__top{position:relative;display:flex;height:1.5rem;flex-grow:0;align-items:center;justify-content:space-between;padding-top:1.25rem;padding-bottom:.75rem;font-size:1.125rem;color:var(--calcite-color-text-1);z-index:2}.content__top__end{margin-inline-start:auto;display:grid;gap:.5rem;grid-auto-flow:column}.actions,.filter-status{flex:1 1 0%}.content__view{margin-inline-end:.25rem;min-width:0px;flex:1 1 0%;padding-inline:var(--arcgis-browser-content-padding, 1rem)}.content__view--padded-bottom{padding-bottom:1rem}.content__view--no-filters{margin-inline-start:.25rem;padding-inline-start:var(--arcgis-browser-content-padding, 1rem)}.pane{pointer-events:none;visibility:hidden;display:flex;height:100%;background-color:var(--calcite-color-background);opacity:0;transition-duration:var(--calcite-internal-animation-timing-medium);transition-property:transform,visibility,opacity;border-left:1px solid var(--calcite-color-border-3);border-right:1px solid var(--calcite-color-border-3)}.pane--open{pointer-events:auto;visibility:visible;opacity:1;transform:translate(0);box-shadow:4px 0 16px #0000000f}.preview{width:0px;flex-shrink:0;flex-grow:0;position:absolute;top:0;bottom:0;inset-inline-start:0;transition-duration:var(--calcite-internal-animation-timing-medium);transition-property:width;z-index:var(--arcgis-browser-pane-z-index)}.preview--fixed{position:fixed}.preview--active{overflow:auto;width:var(--arcgis-browser-pane-width);box-shadow:#0000000f 4px 0 16px}.filter-panel,.preview-panel{position:relative;height:100%;background-color:var(--calcite-color-background)}.filter-panel__content{padding:.75rem 1rem 0}.filter-status--mobile{width:100%}.filter-status--active{display:block}.popover-contents{width:var(--arcgis-browser-popover-width);height:var(--arcgis-browser-popover-height)}.sheet{pointer-events:none;position:fixed;inset:0;z-index:110}.sheet--top-bar{top:3rem;overflow:hidden}.sheet__background{position:absolute;inset:0;opacity:0;transition:all var(--calcite-animation-timing) ease-in-out 0s,outline 0s,outline-offset 0s;background-color:#0003}.sheet__background--hidden{display:none}.sheet--active .sheet__background{opacity:1}.sheet--active{pointer-events:auto;opacity:1}.sheet__contents{position:absolute;inset:0;opacity:0;transition:all var(--calcite-animation-timing) ease-in-out 0s,outline 0s,outline-offset 0s;top:3rem;transform:translate3d(0,24px,0)}.sheet__contents--full{top:0;--tw-shadow: 0 2px 12px -4px rgba(0, 0, 0, .2), 0 2px 4px -2px rgba(0, 0, 0, .16);--tw-shadow-colored: 0 2px 12px -4px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);inset-inline-end:0;width:100%;border:1px solid var(--calcite-color-border-3);border-inline-start:1px solid var(--calcite-color-border-3);transform:translate3d(0,24px,0)}.sheet--active .sheet__contents{opacity:1;transform:translateZ(0)}.hide{display:none}.aria-hidden{height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0;position:absolute;top:0;bottom:0;width:0px;inset-inline-end:0}.content__view--flex{display:flex;flex-direction:column}.cover{display:flex;flex:1 1 0%;align-items:flex-start;justify-content:center;overflow:auto;padding-bottom:1rem;padding-top:.25rem}.no-results{height:100%;width:100%;flex:1 1 0%;text-align:center;font-size:.875rem;color:var(--calcite-color-text-2)}::slotted([slot="no-results"]){width:100%}::slotted([slot="no-content"]){width:100%}.results-wrapper{flex:1 1 0%}.results-wrapper--spaced{padding-top:1.5rem}.loader{margin-top:min(8rem,30vh);--calcite-loader-padding: 0}.filters{box-sizing:border-box;flex-grow:0;padding-inline:1.5rem 0;width:var(--arcgis-browser-pane-width)}.filters--sticky{position:sticky;top:0;height:100%}.filters__content{overflow-y:auto;height:100%;padding-top:1.5rem;box-sizing:border-box;scrollbar-gutter:stable}.filters--empty{display:none}.filters--active{opacity:1;transform:translateZ(0)}.filters__title{margin:0 0 1rem;padding:0 0 1rem;font-size:1.125rem;font-weight:500;color:var(--calcite-color-text-1);padding-inline-start:.75rem;border-bottom:1px solid var(--calcite-color-border-3)}.range{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.875rem;color:var(--calcite-color-text-1)}.container{display:flex;height:100%;width:100%;flex-direction:column;background-color:var(--calcite-color-background)}.container__header{display:flex;flex:0 1 auto;flex-direction:row;background-color:var(--calcite-color-foreground-1);border-bottom:1px solid var(--calcite-color-border-3)}.container__header__text{margin:0;flex:1 1 0%;padding:.875rem .75rem;font-size:1rem;font-weight:500;color:var(--calcite-color-text-2)}.container__content{flex:1 1 0%;overflow:auto}.container__footer{box-sizing:border-box;width:100%;flex:0 1 auto;background-color:var(--calcite-color-foreground-1);padding:.5rem}.small .filters{padding:0}.small .filters__content{padding-left:1rem;padding-right:1rem}.small .content__view{padding-inline:.5rem;margin-inline:0}.small .content__view--panel{padding-inline:0}.small .content__start{margin-inline:0;padding-inline:.5rem}@container portal-browser (max-width: 640px){:host{--arcgis-browser-pane-width: 100%}}.scrim__find{margin-top:3.5rem;opacity:.6;transition-property:opacity;transition-duration:.15s;--calcite-scrim-background: rgba(0, 0, 0, .6)}`;function C(d){return{...d,value:void 0,..."additionalParams"in d?{additionalParams:void 0}:{}}}function I(d,t={}){let{hiddenFilterIds:e,preservedFilterIds:i}=t,a=new Set([...e||[],...i||[]]);return Object.entries(d).reduce((r,[n,c])=>a.has(n)?(r[n]=c,r):(r[n]=C(c),r),{})}function q(d){let t=Math.max(d?.total??0,0),e=d?.results?.length??0;if(!t||!e)return{start:0,end:0,total:t};let i=Math.max(d?.start??1,1),a=Math.min(i+e-1,t);return{start:i,end:a,total:t}}var A=49,f=class extends _{constructor(){super(...arguments),this._messages=F({blocking:!0}),this._previewContainer=x(),this.toggleScrim=t=>{this.scrimActive=t.detail},this.checkFlowItem=()=>{this.flowItem=g(this.el,"calcite-flow-item")},this.handleResize=()=>{requestAnimationFrame(this.updatePreviewPosition)},this.updatePreviewPosition=()=>{if(this.formFactor==="small"||this.height!=="auto"||!this._previewContainer)return;this.checkFlowItem();let t=this._previewContainer.value?.getBoundingClientRect();if(!t)return;let{x:e,y:i,height:a,right:r,width:n}=t,c=a+i,m=window.innerWidth-document.body.offsetWidth,w=window.innerWidth<n||window.innerWidth<window.outerWidth&&window.innerWidth<=n+m;this.previewBoundingBox={top:Math.max(i,0),left:e,right:w?0:window.outerWidth-r-m,bottom:c>window.innerHeight?0:window.innerHeight-c}},this.pageRangeText="",this.noResults=!1,this.initialHide=!0,this.scrimActive=!1,this.panel=!1,this.preview=!1,this.loading=!1,this.hideContentTop=!1,this.alwaysShowSelection=!1,this.alwaysShowContent=!1,this.response={nextStart:-1,num:0,results:[],start:1,total:0},this.store=R(),this.formFactor="large",this.searchTerm="",this.height="full",this.arcgisAriaUpdate=p(),this.arcgisBrowserFilterClear=p(),this.arcgisBrowserFilterRemove=p(),this.ariaUpdate=p()}static{this.properties={pageRangeText:16,noResults:16,previewBoundingBox:16,initialHide:16,scrimActive:16,flowItem:16,panel:5,preview:5,loading:5,hideContentTop:5,hideTopBar:5,selected:0,alwaysShowSelection:5,alwaysShowContent:5,response:0,store:0,formFactor:1,searchTerm:1,height:3,hideFilters:5,showPreSearch:5,rangeFormatter:0,alwaysShowPagination:5}}static{this.styles=U}async scrollToTop(){this.renderRoot.querySelector(".top-bar")?.scrollIntoView({behavior:"smooth",block:"nearest"})}connectedCallback(){super.connectedCallback(),window.addEventListener("scroll",this.handleResize),window.addEventListener("resize",this.handleResize),this.el.addEventListener("arcgisItemBrowserScrimToggle",this.toggleScrim),this.checkFlowItem(),this.attachStoreWatchers()}willUpdate(t){t.has("store")&&this.attachStoreWatchers(),t.has("response")&&this.updatePage(this.response)}firstUpdated(){requestAnimationFrame(this.updatePreviewPosition)}disconnectedCallback(){this.removePreviewWatcher?.(),this.removeStoreWatcher?.(),window.removeEventListener("resize",this.handleResize),window.removeEventListener("scroll",this.handleResize),this.el.removeEventListener("arcgisItemBrowserScrimToggle",this.toggleScrim),super.disconnectedCallback()}attachStoreWatchers(){if(this.removePreviewWatcher?.(),this.removeStoreWatcher?.(),!this.store)return;this.removePreviewWatcher=P(this.store,this.updatePreviewPosition);let t=[l(()=>this.store.type,()=>this.requestUpdate()),l(()=>this.store.width,()=>this.requestUpdate()),l(()=>this.store.height,()=>this.requestUpdate()),l(()=>this.store.filtersEmpty,()=>this.requestUpdate()),l(()=>this.store.topbarEmpty,()=>this.requestUpdate()),l(()=>this.store.sortEmpty,()=>this.requestUpdate()),l(()=>this.store.filtersExpanded,()=>this.requestUpdate()),l(()=>this.store.panel,()=>this.requestUpdate()),l(()=>this.store.preview,()=>this.requestUpdate()),l(()=>this.store.searchTerm,()=>this.requestUpdate()),l(()=>this.store.hiddenFilters,()=>this.requestUpdate()),l(()=>this.store.filters,()=>this.requestUpdate()),l(()=>this.store.recycleBin,()=>this.requestUpdate())];this.removeStoreWatcher=()=>{t.forEach(e=>e.remove())}}async updatePage(t){let[e,i]=await this.updatePageRange(t);this.pageRangeText=e,this.arcgisAriaUpdate.emit(i),this.el.dispatchEvent(new CustomEvent("ariaUpdate",{detail:i})),this.noResults=S(this.store)&&this.store.recycleBin?t.results.length===0:(t?.total??0)===0,this.initialHide=!1}async updatePageRange(t){let{start:e,end:i,total:a}=q(t),r=h.formatNumber(e,{maximumFractionDigits:0}),n=h.formatNumber(i,{maximumFractionDigits:0}),c=`${h.formatNumber(a,{maximumFractionDigits:0})}${a>=1e4?"+":""}`,m=h.formatNumber(t.results?.length??0,{maximumFractionDigits:0}),w=h.formatNumber(Math.max(Math.ceil(e/Math.max(t.num||1,1)),1),{maximumFractionDigits:0});if(this.rangeFormatter)return await this.rangeFormatter({start:r,end:n,total:c,results:{items:m,page:w}});let E=this._messages.browser.pageRange,T=this._messages.browser.pageRangeAria,W=B(E,{start:r,end:n,total:c}),z=B(T,{start:r,end:n,total:c});return[W,z]}hasActiveFilter(t){return Object.values(t.filters).filter(({id:e})=>!$(k,e)).some(e=>!!e.value||e.id==="collaborations")}removeFilter(t){let e=this.store.filters[t];if(!e)return;let i=C(e),a={...this.store.filters,[t]:i};this.store.filters=a,this.arcgisBrowserFilterRemove.emit(t)}clearFilters(){let t=I(this.store.filters,{hiddenFilterIds:this.store.hiddenFilters,preservedFilterIds:["folder","group","contentType"]});this.store.filters=t,this.arcgisBrowserFilterClear.emit(null)}renderNoResults(){let t=this.noResults&&!this.loading&&!this.showPreSearch,e=this.hasActiveFilter(this.store)||!!this.searchTerm;return t?o`<div class="cover"><div class="no-results">${e?o`<slot name=no-results></slot>`:o`<slot name=no-content></slot>`}</div></div>`:null}renderPopoverContents(t,e,i){let a=this.flowItem?this.flowItem.offsetHeight:this.store.height,r=this.formFactor==="small"&&this.hasActiveFilter(this.store)&&!this.hideFilters;return this.el.style.setProperty("--arcgis-browser-popover-width",i?"100%":`${this.store.width||0}px`),this.el.style.setProperty("--arcgis-browser-popover-height",i?"100%":`${a||0}px`),o`<div class="popover-contents"><div class=${s({hide:!e,"preview-panel":!0})}><slot name=preview></slot></div><div class=${s({hide:!t,"filter-panel":!0})}><article class="container"><header class="container__header"><h2 class="container__header__text">${this._messages.browser?.refineContent}</h2><calcite-action .text=${this._messages.browser?.close} scale=m icon=x @click=${()=>{this.store.filtersExpanded=!1}}></calcite-action></header><div class="container__content"><div class="container__content__scroll"><slot name=filters-top></slot>${(this.store.panel||i)&&o`<div class="filter-container__content"><slot name=sort></slot></div>`||""}<slot name=filters></slot></div></div><div class=${s({"filter-status--mobile":!0,container__footer:!0,hide:!r})}><arcgis-portal-browser-filter-status class="filter-status" .filters=${this.store.filters} .hiddenFilterIds=${this.store.hiddenFilters||[]} .componentWidth=${this.store.width||this.flowItem?.offsetWidth||window.innerWidth} .browserWidth=${window.innerWidth} @arcgisBrowserFilterClear=${()=>this.clearFilters()} @arcgisBrowserFilterRemove=${n=>this.removeFilter(n.detail)}></arcgis-portal-browser-filter-status></div></article></div></div>`}renderFlow(){let t=!!this.store.panel,e=!!this.store.filtersExpanded&&(!this.store.filtersEmpty||!this.store.sortEmpty&&t),i=!!this.store.preview,a=!this.store.panel&&document.documentElement.clientWidth>(this.store.width||0);return o`<div class=${s({panel:!0,"panel--fixed":a})}>${!this.hideTopBar&&o`<div class=${s({"top-bar":!0,"top-bar--small":this.formFactor==="small"})}><slot name=top-bar></slot></div>`||""}<div class="scrolling scrolling--panel"><div class=${s({"two-up":!0,[this.formFactor]:!0})}><div class="content"><div><slot name=primary-filter></slot></div><div class="content__start"><slot name=content-start></slot></div>${this.loading&&!this.alwaysShowContent&&o`<div class="content__view content__view--flex"><div class="cover"><calcite-loader class="loader" label></calcite-loader></div></div>`||""}${this.noResults&&!this.loading&&o`<div class="content__view content__view--flex"><div class="cover">${this.renderNoResults()}</div></div>`||""}<div class=${s({hide:this.loading||this.noResults,content__view:!0,"content__view--panel":!!this.store.panel,"content__view--flex":!this.loading&&!this.noResults})}>${!this.store.panel&&!this.hideContentTop&&o`<div class="content__top"><span class=${s({selection:!0,hide:!this.alwaysShowSelection})}><slot name=selection></slot></span>${!this.loading&&o`<span class="range">${this.pageRangeText}</span>`||""}<span class="actions"><slot name=actions></slot></span><div class="content__top__end"><slot name=view></slot>${!t&&o`<slot name=sort></slot>`||""}</div></div>`||""}<div class="flow-content"><slot name=content></slot></div><slot name=pagination></slot><slot name=content-end></slot></div></div></div><slot name=scroll-end></slot></div>${!this.store.panel||window.innerWidth<(this.store.width||0)*2?o`<div class=${s({sheet:!0,"sheet--active":e||i,"sheet--top-bar":a})}><div class=${s({sheet__background:!0,"sheet__background--hidden":a})}></div><div class=${s({sheet__contents:!0,"sheet__contents--full":a})}>${this.renderPopoverContents(e,i,!0)}</div></div>`:o`<calcite-popover overlay-positioning=fixed .open=${i||e} label=filters .referenceElement=${this.flowItem||this.el} offset-skidding=0 offset-distance=0 trigger-disabled pointer-disabled .placement=${this.store.panel?"trailing":"auto"} @calcitePopoverOpen=${r=>{(!this.store.panel||window.innerWidth<(this.store.width||0)*2)&&(r.currentTarget.style.transform="none")}} .focusTrapOptions=${{setReturnFocus:r=>{if(!(r instanceof HTMLElement))return r;let n=g(r,"arcgis-portal-item-card, arcgis-portal-group-card");return n?.restoreFocus?(n.restoreFocus(),!1):r}}}>${this.renderPopoverContents(e,i)}</calcite-popover>`}</div>`}render(){let t=this.height==="auto",e=this.height==="full",i=!!this.store.preview,a=`${(this.store.height||window.innerHeight)-A}px`,r=t?{}:{maxHeight:a};return this.formFactor==="small"?this.renderFlow():o`<div class=${s({wrapper:!0,"wrapper--fixed":!!this.store.filtersExpanded,"wrapper--auto":t,"wrapper--full":e})}>${!this.hideTopBar&&o`<div class="top-bar"><slot name=top-bar></slot></div>`||""}<slot name=top-bar-end></slot><div class=${s({"preview-position":!0,"preview-position--with-top-bar":!this.store.topbarEmpty})} ${b(this._previewContainer)}><div class=${s({preview:!0,"preview--active":i,"preview--fixed":t})} style=${v(t&&this.previewBoundingBox?{top:`${this.previewBoundingBox.top||0}px`,...document.dir==="rtl"?{right:`${this.previewBoundingBox.right||0}px`}:{left:`${this.previewBoundingBox.left||0}px`},bottom:`${this.previewBoundingBox.bottom||0}px`}:{})}><div class=${s({pane:!0,"pane--open":i})}><div class="preview-desktop"><slot name=preview></slot></div></div></div></div><div class=${s({scrolling:!0,"scrolling--full":!t||this.panel})}>${this.scrimActive&&o`<calcite-scrim class="scrim__find"></calcite-scrim>`||""}<div class=${s({"two-up":!0,"two-up--fullscreen":e,[this.formFactor]:!0})}><div class=${s({filters:!0,"filters--sticky":!t,"filters--empty":this.store.filtersEmpty&&!this.store.preview,"filters--active":!!this.store.filtersExpanded})} style=${v(e?{}:r)}><div class="filters__content" style=${v(e?{}:r)}><slot name=filters></slot></div></div><div class=${s({content:!0,"content--full":e})}><div class="content__start"><slot name=content-start></slot></div><div class=${s({content__view:!0,"content__view--no-filters":this.store.filtersEmpty&&!this.store.preview,"content__view--flex":!0})}>${!this.hideContentTop&&o`<div class="content__top">${this.showPreSearch?null:o`<div class="content__top__summary"><span class=${s({selection:!0,hide:!this.alwaysShowSelection})}><slot name=selection></slot></span>${!this.loading&&o`<span class="range">${this.pageRangeText}<slot name=range-end></slot></span>`||""}</div>`}<span class="actions"><slot name=actions></slot></span><div class="content__top__end"><slot name=view></slot><slot name=sort></slot></div></div>`||""}${this.loading&&(!this.alwaysShowContent||this.initialHide)&&o`<div class="cover"><calcite-loader class="loader" .label=${this._messages.browser?.loading??""}></calcite-loader></div>`||""}${this.renderNoResults()}${!this.loading&&this.showPreSearch&&o`<div class="cover"><div class="no-results"><slot name=pre-search></slot></div></div>`||""}<div class=${s({hide:!!this.showPreSearch||this.loading&&!this.alwaysShowContent||!this.loading&&this.noResults||this.initialHide,"results-wrapper--spaced":this.hideContentTop,"results-wrapper":!0})}><slot name=content></slot></div><div class=${s({hide:this.loading||this.noResults&&!this.alwaysShowPagination})}><slot name=pagination></slot><slot name=content-end></slot></div></div></div></div><slot name=scroll-end></slot></div></div>`}};y("arcgis-portal-browser",f);return{a:C,b:I,c:f}},"core/reactiveUtils","intl","intl",a)
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import{d as g}from"./25XJ66JO.js";import a from"./XKC6SPS4.js";import{c as $}from"./2GBRZSEC.js";import{a as F}from"./XUPYBBRI.js";import{J as x,K as b,L as _,M as s,N as v,R as y,h as u,j as o,w as p}from"./CWSEBETE.js";export default $arcgis.t(([{watch:l},h,{substitute:B},{a:k,b:S,c:R,d:P}])=>{var U=u`:host{position:relative;display:flex;height:100%;flex-direction:column;overflow-y:auto;overflow-x:hidden;background-color:var(--calcite-color-background);--arcgis-browser-max-width: 100%;--arcgis-browser-pane-width: 18.75rem;--arcgis-browser-pane-z-index: 11;container-type:inline-size;container-name:portal-browser}:host([height="auto"]){height:auto;min-height:100%;flex:1 1 100%}.wrapper{display:flex;height:100%;flex-direction:column;overflow:hidden}.wrapper--fixed{overflow:hidden}.wrapper--auto{flex:1 1 100%}.wrapper--full{transform:translate(0)}.panel{display:flex;height:100%;flex-direction:column;overflow:hidden}.panel--fixed{transform:translateZ(0)}.top-bar{position:sticky;top:0;right:0;left:0;z-index:20;flex-shrink:0;flex-grow:0;border-bottom:1px solid var(--calcite-color-border-3)}.scrolling{position:relative;display:flex;min-height:0px;width:100%;flex:1 1 0%;flex-direction:column}.scrolling--panel{overflow-y:scroll}@supports (scrollbar-gutter: stable){.scrolling--panel{scrollbar-gutter:stable;overflow-y:auto}}.scrolling--full{overflow:hidden}.preview-position{position:absolute;inset:0;margin-inline:auto;width:100%;max-width:var(--arcgis-browser-max-width)}.preview-position--with-top-bar{top:3rem}.preview-desktop{width:100%}.two-up{margin-left:auto;margin-right:auto;display:flex;width:100%;flex:1 1 auto;flex-direction:row;max-width:var(--arcgis-browser-max-width)}.two-up.small{margin-top:-1px}.two-up--fullscreen{height:100%;overflow:hidden}.content__start{margin-inline-end:.25rem;padding-inline:1rem}.content{position:relative;display:flex;min-width:0px;flex:1 1 0%;flex-direction:column;overflow:hidden}.content--full{overflow-y:scroll}@supports (scrollbar-gutter: stable){.content--full{scrollbar-gutter:stable;overflow-y:auto}}.content__top{position:relative;display:flex;height:1.5rem;flex-grow:0;align-items:center;justify-content:space-between;padding-top:1.25rem;padding-bottom:.75rem;font-size:1.125rem;color:var(--calcite-color-text-1);z-index:2}.content__top__end{margin-inline-start:auto;display:grid;gap:.5rem;grid-auto-flow:column}.actions,.filter-status{flex:1 1 0%}.content__view{margin-inline-end:.25rem;min-width:0px;flex:1 1 0%;padding-inline:var(--arcgis-browser-content-padding, 1rem)}.content__view--padded-bottom{padding-bottom:1rem}.content__view--no-filters{margin-inline-start:.25rem;padding-inline-start:var(--arcgis-browser-content-padding, 1rem)}.pane{pointer-events:none;visibility:hidden;display:flex;height:100%;background-color:var(--calcite-color-background);opacity:0;transition-duration:var(--calcite-internal-animation-timing-medium);transition-property:transform,visibility,opacity;border-left:1px solid var(--calcite-color-border-3);border-right:1px solid var(--calcite-color-border-3)}.pane--open{pointer-events:auto;visibility:visible;opacity:1;transform:translate(0);box-shadow:4px 0 16px #0000000f}.preview{width:0px;flex-shrink:0;flex-grow:0;position:absolute;top:0;bottom:0;inset-inline-start:0;transition-duration:var(--calcite-internal-animation-timing-medium);transition-property:width;z-index:var(--arcgis-browser-pane-z-index)}.preview--fixed{position:fixed}.preview--active{overflow:auto;width:var(--arcgis-browser-pane-width);box-shadow:#0000000f 4px 0 16px}.filter-panel,.preview-panel{position:relative;height:100%;background-color:var(--calcite-color-background)}.filter-panel__content{padding:.75rem 1rem 0}.filter-status--mobile{width:100%}.filter-status--active{display:block}.popover-contents{width:var(--arcgis-browser-popover-width);height:var(--arcgis-browser-popover-height)}.sheet{pointer-events:none;position:fixed;inset:0;z-index:110}.sheet--top-bar{top:3rem;overflow:hidden}.sheet__background{position:absolute;inset:0;opacity:0;transition:all var(--calcite-animation-timing) ease-in-out 0s,outline 0s,outline-offset 0s;background-color:#0003}.sheet__background--hidden{display:none}.sheet--active .sheet__background{opacity:1}.sheet--active{pointer-events:auto;opacity:1}.sheet__contents{position:absolute;inset:0;opacity:0;transition:all var(--calcite-animation-timing) ease-in-out 0s,outline 0s,outline-offset 0s;top:3rem;transform:translate3d(0,24px,0)}.sheet__contents--full{top:0;--tw-shadow: 0 2px 12px -4px rgba(0, 0, 0, .2), 0 2px 4px -2px rgba(0, 0, 0, .16);--tw-shadow-colored: 0 2px 12px -4px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);inset-inline-end:0;width:100%;border:1px solid var(--calcite-color-border-3);border-inline-start:1px solid var(--calcite-color-border-3);transform:translate3d(0,24px,0)}.sheet--active .sheet__contents{opacity:1;transform:translateZ(0)}.hide{display:none}.aria-hidden{height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0;position:absolute;top:0;bottom:0;width:0px;inset-inline-end:0}.content__view--flex{display:flex;flex-direction:column}.cover{display:flex;flex:1 1 0%;align-items:flex-start;justify-content:center;overflow:auto;padding-bottom:1rem;padding-top:.25rem}.no-results{height:100%;width:100%;flex:1 1 0%;text-align:center;font-size:.875rem;color:var(--calcite-color-text-2)}::slotted([slot="no-results"]){width:100%}::slotted([slot="no-content"]){width:100%}.results-wrapper{flex:1 1 0%}.results-wrapper--spaced{padding-top:1.5rem}.loader{margin-top:min(8rem,30vh);--calcite-loader-padding: 0}.filters{box-sizing:border-box;flex-grow:0;padding-inline:1.5rem 0;width:var(--arcgis-browser-pane-width)}.filters--sticky{position:sticky;top:0;height:100%}.filters__content{overflow-y:auto;height:100%;padding-top:1.5rem;box-sizing:border-box;scrollbar-gutter:stable}.filters--empty{display:none}.filters--active{opacity:1;transform:translateZ(0)}.filters__title{margin:0 0 1rem;padding:0 0 1rem;font-size:1.125rem;font-weight:500;color:var(--calcite-color-text-1);padding-inline-start:.75rem;border-bottom:1px solid var(--calcite-color-border-3)}.range{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.875rem;color:var(--calcite-color-text-1)}.container{display:flex;height:100%;width:100%;flex-direction:column;background-color:var(--calcite-color-background)}.container__header{display:flex;flex:0 1 auto;flex-direction:row;background-color:var(--calcite-color-foreground-1);border-bottom:1px solid var(--calcite-color-border-3)}.container__header__text{margin:0;flex:1 1 0%;padding:.875rem .75rem;font-size:1rem;font-weight:500;color:var(--calcite-color-text-2)}.container__content{flex:1 1 0%;overflow:auto}.container__footer{box-sizing:border-box;width:100%;flex:0 1 auto;background-color:var(--calcite-color-foreground-1);padding:.5rem}.small .filters{padding:0}.small .filters__content{padding-left:1rem;padding-right:1rem}.small .content__view{padding-inline:.5rem;margin-inline:0}.small .content__view--panel{padding-inline:0}.small .content__start{margin-inline:0;padding-inline:.5rem}@container portal-browser (max-width: 640px){:host{--arcgis-browser-pane-width: 100%}}.scrim__find{margin-top:3.5rem;opacity:.6;transition-property:opacity;transition-duration:.15s;--calcite-scrim-background: rgba(0, 0, 0, .6)}`;function C(d){return{...d,value:void 0,..."additionalParams"in d?{additionalParams:void 0}:{}}}function I(d,t={}){let{hiddenFilterIds:e,preservedFilterIds:i}=t,a=new Set([...e||[],...i||[]]);return Object.entries(d).reduce((r,[n,c])=>a.has(n)?(r[n]=c,r):(r[n]=C(c),r),{})}function q(d){let t=Math.max(d?.total??0,0),e=d?.results?.length??0;if(!t||!e)return{start:0,end:0,total:t};let i=Math.max(d?.start??1,1),a=Math.min(i+e-1,t);return{start:i,end:a,total:t}}var A=49,f=class extends _{constructor(){super(...arguments),this._messages=F({blocking:!0}),this._previewContainer=x(),this.toggleScrim=t=>{this.scrimActive=t.detail},this.checkFlowItem=()=>{this.flowItem=g(this.el,"calcite-flow-item")},this.handleResize=()=>{requestAnimationFrame(this.updatePreviewPosition)},this.updatePreviewPosition=()=>{if(this.formFactor==="small"||this.height!=="auto"||!this._previewContainer)return;this.checkFlowItem();let t=this._previewContainer.value?.getBoundingClientRect();if(!t)return;let{x:e,y:i,height:a,right:r,width:n}=t,c=a+i,m=window.innerWidth-document.body.offsetWidth,w=window.innerWidth<n||window.innerWidth<window.outerWidth&&window.innerWidth<=n+m;this.previewBoundingBox={top:Math.max(i,0),left:e,right:w?0:window.outerWidth-r-m,bottom:c>window.innerHeight?0:window.innerHeight-c}},this.pageRangeText="",this.noResults=!1,this.initialHide=!0,this.scrimActive=!1,this.panel=!1,this.preview=!1,this.loading=!1,this.hideContentTop=!1,this.alwaysShowSelection=!1,this.alwaysShowContent=!1,this.response={nextStart:-1,num:0,results:[],start:1,total:0},this.store=R(),this.formFactor="large",this.searchTerm="",this.height="full",this.arcgisAriaUpdate=p(),this.arcgisBrowserFilterClear=p(),this.arcgisBrowserFilterRemove=p(),this.ariaUpdate=p()}static{this.properties={pageRangeText:16,noResults:16,previewBoundingBox:16,initialHide:16,scrimActive:16,flowItem:16,panel:5,preview:5,loading:5,hideContentTop:5,hideTopBar:5,selected:0,alwaysShowSelection:5,alwaysShowContent:5,response:0,store:0,formFactor:1,searchTerm:1,height:3,hideFilters:5,showPreSearch:5,rangeFormatter:0,alwaysShowPagination:5}}static{this.styles=U}async scrollToTop(){this.renderRoot.querySelector(".top-bar")?.scrollIntoView({behavior:"smooth",block:"nearest"})}connectedCallback(){super.connectedCallback(),window.addEventListener("scroll",this.handleResize),window.addEventListener("resize",this.handleResize),this.el.addEventListener("arcgisItemBrowserScrimToggle",this.toggleScrim),this.checkFlowItem(),this.attachStoreWatchers()}willUpdate(t){t.has("store")&&this.attachStoreWatchers(),t.has("response")&&this.updatePage(this.response)}firstUpdated(){requestAnimationFrame(this.updatePreviewPosition)}disconnectedCallback(){this.removePreviewWatcher?.(),this.removeStoreWatcher?.(),window.removeEventListener("resize",this.handleResize),window.removeEventListener("scroll",this.handleResize),this.el.removeEventListener("arcgisItemBrowserScrimToggle",this.toggleScrim),super.disconnectedCallback()}attachStoreWatchers(){if(this.removePreviewWatcher?.(),this.removeStoreWatcher?.(),!this.store)return;this.removePreviewWatcher=P(this.store,this.updatePreviewPosition);let t=[l(()=>this.store.type,()=>this.requestUpdate()),l(()=>this.store.width,()=>this.requestUpdate()),l(()=>this.store.height,()=>this.requestUpdate()),l(()=>this.store.filtersEmpty,()=>this.requestUpdate()),l(()=>this.store.topbarEmpty,()=>this.requestUpdate()),l(()=>this.store.sortEmpty,()=>this.requestUpdate()),l(()=>this.store.filtersExpanded,()=>this.requestUpdate()),l(()=>this.store.panel,()=>this.requestUpdate()),l(()=>this.store.preview,()=>this.requestUpdate()),l(()=>this.store.searchTerm,()=>this.requestUpdate()),l(()=>this.store.hiddenFilters,()=>this.requestUpdate()),l(()=>this.store.filters,()=>this.requestUpdate()),l(()=>this.store.recycleBin,()=>this.requestUpdate())];this.removeStoreWatcher=()=>{t.forEach(e=>e.remove())}}async updatePage(t){let[e,i]=await this.updatePageRange(t);this.pageRangeText=e,this.arcgisAriaUpdate.emit(i),this.el.dispatchEvent(new CustomEvent("ariaUpdate",{detail:i})),this.noResults=S(this.store)&&this.store.recycleBin?t.results.length===0:(t?.total??0)===0,this.initialHide=!1}async updatePageRange(t){let{start:e,end:i,total:a}=q(t),r=h.formatNumber(e,{maximumFractionDigits:0}),n=h.formatNumber(i,{maximumFractionDigits:0}),c=`${h.formatNumber(a,{maximumFractionDigits:0})}${a>=1e4?"+":""}`,m=h.formatNumber(t.results?.length??0,{maximumFractionDigits:0}),w=h.formatNumber(Math.max(Math.ceil(e/Math.max(t.num||1,1)),1),{maximumFractionDigits:0});if(this.rangeFormatter)return await this.rangeFormatter({start:r,end:n,total:c,results:{items:m,page:w}});let E=this._messages.browser.pageRange,T=this._messages.browser.pageRangeAria,W=B(E,{start:r,end:n,total:c}),z=B(T,{start:r,end:n,total:c});return[W,z]}hasActiveFilter(t){return Object.values(t.filters).filter(({id:e})=>!$(k,e)).some(e=>!!e.value||e.id==="collaborations")}removeFilter(t){let e=this.store.filters[t];if(!e)return;let i=C(e),a={...this.store.filters,[t]:i};this.store.filters=a,this.arcgisBrowserFilterRemove.emit(t)}clearFilters(){let t=I(this.store.filters,{hiddenFilterIds:this.store.hiddenFilters,preservedFilterIds:["folder","group","contentType"]});this.store.filters=t,this.arcgisBrowserFilterClear.emit(null)}renderNoResults(){let t=this.noResults&&!this.loading&&!this.showPreSearch,e=this.hasActiveFilter(this.store)||!!this.searchTerm;return t?o`<div class="cover"><div class="no-results">${e?o`<slot name=no-results></slot>`:o`<slot name=no-content></slot>`}</div></div>`:null}renderPopoverContents(t,e,i){let a=this.flowItem?this.flowItem.offsetHeight:this.store.height,r=this.formFactor==="small"&&this.hasActiveFilter(this.store)&&!this.hideFilters;return this.el.style.setProperty("--arcgis-browser-popover-width",i?"100%":`${this.store.width||0}px`),this.el.style.setProperty("--arcgis-browser-popover-height",i?"100%":`${a||0}px`),o`<div class="popover-contents"><div class=${s({hide:!e,"preview-panel":!0})}><slot name=preview></slot></div><div class=${s({hide:!t,"filter-panel":!0})}><article class="container"><header class="container__header"><h2 class="container__header__text">${this._messages.browser?.refineContent}</h2><calcite-action .text=${this._messages.browser?.close} scale=m icon=x @click=${()=>{this.store.filtersExpanded=!1}}></calcite-action></header><div class="container__content"><div class="container__content__scroll"><slot name=filters-top></slot>${(this.store.panel||i)&&o`<div class="filter-container__content"><slot name=sort></slot></div>`||""}<slot name=filters></slot></div></div><div class=${s({"filter-status--mobile":!0,container__footer:!0,hide:!r})}><arcgis-portal-browser-filter-status class="filter-status" .filters=${this.store.filters} .hiddenFilterIds=${this.store.hiddenFilters||[]} .componentWidth=${this.store.width||this.flowItem?.offsetWidth||window.innerWidth} .browserWidth=${window.innerWidth} @arcgisBrowserFilterClear=${()=>this.clearFilters()} @arcgisBrowserFilterRemove=${n=>this.removeFilter(n.detail)}></arcgis-portal-browser-filter-status></div></article></div></div>`}renderFlow(){let t=!!this.store.panel,e=!!this.store.filtersExpanded&&(!this.store.filtersEmpty||!this.store.sortEmpty&&t),i=!!this.store.preview,a=!this.store.panel&&document.documentElement.clientWidth>(this.store.width||0);return o`<div class=${s({panel:!0,"panel--fixed":a})}>${!this.hideTopBar&&o`<div class=${s({"top-bar":!0,"top-bar--small":this.formFactor==="small"})}><slot name=top-bar></slot></div>`||""}<div class="scrolling scrolling--panel"><div class=${s({"two-up":!0,[this.formFactor]:!0})}><div class="content"><div><slot name=primary-filter></slot></div><div class="content__start"><slot name=content-start></slot></div>${this.loading&&!this.alwaysShowContent&&o`<div class="content__view content__view--flex"><div class="cover"><calcite-loader class="loader" label></calcite-loader></div></div>`||""}${this.noResults&&!this.loading&&o`<div class="content__view content__view--flex"><div class="cover">${this.renderNoResults()}</div></div>`||""}<div class=${s({hide:this.loading||this.noResults,content__view:!0,"content__view--panel":!!this.store.panel,"content__view--flex":!this.loading&&!this.noResults})}>${!this.store.panel&&!this.hideContentTop&&o`<div class="content__top"><span class=${s({selection:!0,hide:!this.alwaysShowSelection})}><slot name=selection></slot></span>${!this.loading&&o`<span class="range">${this.pageRangeText}</span>`||""}<span class="actions"><slot name=actions></slot></span><div class="content__top__end"><slot name=view></slot>${!t&&o`<slot name=sort></slot>`||""}</div></div>`||""}<div class="flow-content"><slot name=content></slot></div><slot name=pagination></slot><slot name=content-end></slot></div></div></div><slot name=scroll-end></slot></div>${!this.store.panel||window.innerWidth<(this.store.width||0)*2?o`<div class=${s({sheet:!0,"sheet--active":e||i,"sheet--top-bar":a})}><div class=${s({sheet__background:!0,"sheet__background--hidden":a})}></div><div class=${s({sheet__contents:!0,"sheet__contents--full":a})}>${this.renderPopoverContents(e,i,!0)}</div></div>`:o`<calcite-popover overlay-positioning=fixed .open=${i||e} label=filters .referenceElement=${this.flowItem||this.el} offset-skidding=0 offset-distance=0 trigger-disabled pointer-disabled .placement=${this.store.panel?"trailing":"auto"} @calcitePopoverOpen=${r=>{(!this.store.panel||window.innerWidth<(this.store.width||0)*2)&&(r.currentTarget.style.transform="none")}} .focusTrapOptions=${{setReturnFocus:r=>{if(!(r instanceof HTMLElement))return r;let n=g(r,"arcgis-portal-item-card, arcgis-portal-group-card");return n?.restoreFocus?(n.restoreFocus(),!1):r}}}>${this.renderPopoverContents(e,i)}</calcite-popover>`}</div>`}render(){let t=this.height==="auto",e=this.height==="full",i=!!this.store.preview,a=`${(this.store.height||window.innerHeight)-A}px`,r=t?{}:{maxHeight:a};return this.formFactor==="small"?this.renderFlow():o`<div class=${s({wrapper:!0,"wrapper--fixed":!!this.store.filtersExpanded,"wrapper--auto":t,"wrapper--full":e})}>${!this.hideTopBar&&o`<div class="top-bar"><slot name=top-bar></slot></div>`||""}<slot name=top-bar-end></slot><div class=${s({"preview-position":!0,"preview-position--with-top-bar":!this.store.topbarEmpty})} ${b(this._previewContainer)}><div class=${s({preview:!0,"preview--active":i,"preview--fixed":t})} style=${v(t&&this.previewBoundingBox?{top:`${this.previewBoundingBox.top||0}px`,...document.dir==="rtl"?{right:`${this.previewBoundingBox.right||0}px`}:{left:`${this.previewBoundingBox.left||0}px`},bottom:`${this.previewBoundingBox.bottom||0}px`}:{})}><div class=${s({pane:!0,"pane--open":i})}><div class="preview-desktop"><slot name=preview></slot></div></div></div></div><div class=${s({scrolling:!0,"scrolling--full":!t||this.panel})}>${this.scrimActive&&o`<calcite-scrim class="scrim__find"></calcite-scrim>`||""}<div class=${s({"two-up":!0,"two-up--fullscreen":e,[this.formFactor]:!0})}><div class=${s({filters:!0,"filters--sticky":!t,"filters--empty":this.store.filtersEmpty&&!this.store.preview,"filters--active":!!this.store.filtersExpanded})} style=${v(e?{}:r)}><div class="filters__content" style=${v(e?{}:r)}><slot name=filters></slot></div></div><div class=${s({content:!0,"content--full":e})}><div class="content__start"><slot name=content-start></slot></div><div class=${s({content__view:!0,"content__view--no-filters":this.store.filtersEmpty&&!this.store.preview,"content__view--flex":!0})}>${!this.hideContentTop&&o`<div class="content__top">${this.showPreSearch?null:o`<div class="content__top__summary"><span class=${s({selection:!0,hide:!this.alwaysShowSelection})}><slot name=selection></slot></span>${!this.loading&&o`<span class="range">${this.pageRangeText}<slot name=range-end></slot></span>`||""}</div>`}<span class="actions"><slot name=actions></slot></span><div class="content__top__end"><slot name=view></slot><slot name=sort></slot></div></div>`||""}${this.loading&&(!this.alwaysShowContent||this.initialHide)&&o`<div class="cover"><calcite-loader class="loader" .label=${this._messages.browser?.loading??""}></calcite-loader></div>`||""}${this.renderNoResults()}${!this.loading&&this.showPreSearch&&o`<div class="cover"><div class="no-results"><slot name=pre-search></slot></div></div>`||""}<div class=${s({hide:!!this.showPreSearch||this.loading&&!this.alwaysShowContent||!this.loading&&this.noResults||this.initialHide,"results-wrapper--spaced":this.hideContentTop,"results-wrapper":!0})}><slot name=content></slot></div><div class=${s({hide:this.loading||this.noResults&&!this.alwaysShowPagination})}><slot name=pagination></slot><slot name=content-end></slot></div></div></div></div><slot name=scroll-end></slot></div></div>`}};y("arcgis-portal-browser",f);return{a:C,b:I,c:f}},"core/reactiveUtils","intl","intl",a)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
2
|
var n=(e,o=100)=>{let t;return(...c)=>{let i=()=>{clearTimeout(t),e(...c)};clearTimeout(t),t=setTimeout(i,o)}};export{n as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import a from"./
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import a from"./LNWWUPFK.js";export default $arcgis.t(([{watch:s},{b:r}])=>{var t=r;var f=["folder","group","contentType"],l=e=>e.type==="item-browser",o={filters:{},hiddenFilters:[],preview:null},w=(e=o)=>t({...o,...e});function y(e,a){let c=s(()=>e.preview,a);return()=>c.remove()}return{a:f,b:l,c:w,d:y}},"core/reactiveUtils",a)
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import g from"./E3FQ4QWE.js";import"./BIXJGL7B.js";import f from"./47PU5HDG.js";import e from"./IXSEMBHA.js";import"./ILDTKRON.js";import d from"./6EY5GHKE.js";import"./CFBSBZSS.js";import"./QDWOQBO3.js";import"./UZCHLKLO.js";import"./25XJ66JO.js";import"./5YDITHQA.js";import c from"./RBGARTND.js";import b from"./F3ODJVJC.js";import"./OV5O7YP4.js";import"./KYNL256E.js";import a from"./OUFIJDIW.js";import"./VMQIDO4Z.js";import"./QS3GXAIH.js";import"./2GBRZSEC.js";import"./XUPYBBRI.js";import"./C5U7YKVI.js";import"./6BMWSGLA.js";import{R as r}from"./CWSEBETE.js";import"./R74ZHFA6.js";import"./UZLQALHY.js";export default $arcgis.t(([,,,,,,e])=>{var t=class extends e{constructor(){super(...arguments),this.entityType="group",this.selected=null}static{this.properties={entityType:32,selected:0}}};r("arcgis-portal-group-picker",t);return t},a,b,c,d,e,f,g)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import{a as Pe,c as Sn}from"./
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import{a as Pe,c as Sn}from"./UZLQALHY.js";var cs=Pe((Mm,Vr)=>{"use strict";var pl=Object.prototype.hasOwnProperty,K="~";function Qe(){}Object.create&&(Qe.prototype=Object.create(null),new Qe().__proto__||(K=!1));function ml(t,e,r){this.fn=t,this.context=e,this.once=r||!1}function os(t,e,r,n,i){if(typeof r!="function")throw new TypeError("The listener must be a function");var a=new ml(r,n||t,i),s=K?K+e:e;return t._events[s]?t._events[s].fn?t._events[s]=[t._events[s],a]:t._events[s].push(a):(t._events[s]=a,t._eventsCount++),t}function kt(t,e){--t._eventsCount===0?t._events=new Qe:delete t._events[e]}function G(){this._events=new Qe,this._eventsCount=0}G.prototype.eventNames=function(){var e=[],r,n;if(this._eventsCount===0)return e;for(n in r=this._events)pl.call(r,n)&&e.push(K?n.slice(1):n);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(r)):e};G.prototype.listeners=function(e){var r=K?K+e:e,n=this._events[r];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,a=n.length,s=new Array(a);i<a;i++)s[i]=n[i].fn;return s};G.prototype.listenerCount=function(e){var r=K?K+e:e,n=this._events[r];return n?n.fn?1:n.length:0};G.prototype.emit=function(e,r,n,i,a,s){var o=K?K+e:e;if(!this._events[o])return!1;var c=this._events[o],u=arguments.length,l,d;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),u){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,r),!0;case 3:return c.fn.call(c.context,r,n),!0;case 4:return c.fn.call(c.context,r,n,i),!0;case 5:return c.fn.call(c.context,r,n,i,a),!0;case 6:return c.fn.call(c.context,r,n,i,a,s),!0}for(d=1,l=new Array(u-1);d<u;d++)l[d-1]=arguments[d];c.fn.apply(c.context,l)}else{var f=c.length,h;for(d=0;d<f;d++)switch(c[d].once&&this.removeListener(e,c[d].fn,void 0,!0),u){case 1:c[d].fn.call(c[d].context);break;case 2:c[d].fn.call(c[d].context,r);break;case 3:c[d].fn.call(c[d].context,r,n);break;case 4:c[d].fn.call(c[d].context,r,n,i);break;default:if(!l)for(h=1,l=new Array(u-1);h<u;h++)l[h-1]=arguments[h];c[d].fn.apply(c[d].context,l)}}return!0};G.prototype.on=function(e,r,n){return os(this,e,r,n,!1)};G.prototype.once=function(e,r,n){return os(this,e,r,n,!0)};G.prototype.removeListener=function(e,r,n,i){var a=K?K+e:e;if(!this._events[a])return this;if(!r)return kt(this,a),this;var s=this._events[a];if(s.fn)s.fn===r&&(!i||s.once)&&(!n||s.context===n)&&kt(this,a);else{for(var o=0,c=[],u=s.length;o<u;o++)(s[o].fn!==r||i&&!s[o].once||n&&s[o].context!==n)&&c.push(s[o]);c.length?this._events[a]=c.length===1?c[0]:c:kt(this,a)}return this};G.prototype.removeAllListeners=function(e){var r;return e?(r=K?K+e:e,this._events[r]&&kt(this,r)):(this._events=new Qe,this._eventsCount=0),this};G.prototype.off=G.prototype.removeListener;G.prototype.addListener=G.prototype.on;G.prefixed=K;G.EventEmitter=G;typeof Vr<"u"&&(Vr.exports=G)});var us=Pe((Nm,ls)=>{"use strict";ls.exports=(t,e)=>(e=e||(()=>{}),t.then(r=>new Promise(n=>{n(e())}).then(()=>r),r=>new Promise(n=>{n(e())}).then(()=>{throw r})))});var fs=Pe((Pm,$t)=>{"use strict";var _l=us(),Lt=class extends Error{constructor(e){super(e),this.name="TimeoutError"}},ds=(t,e,r)=>new Promise((n,i)=>{if(typeof e!="number"||e<0)throw new TypeError("Expected `milliseconds` to be a positive number");if(e===1/0){n(t);return}let a=setTimeout(()=>{if(typeof r=="function"){try{n(r())}catch(c){i(c)}return}let s=typeof r=="string"?r:`Promise timed out after ${e} milliseconds`,o=r instanceof Error?r:new Lt(s);typeof t.cancel=="function"&&t.cancel(),i(o)},e);_l(t.then(n,i),()=>{clearTimeout(a)})});$t.exports=ds;$t.exports.default=ds;$t.exports.TimeoutError=Lt});var hs=Pe(qr=>{"use strict";Object.defineProperty(qr,"__esModule",{value:!0});function gl(t,e,r){let n=0,i=t.length;for(;i>0;){let a=i/2|0,s=n+a;r(t[s],e)<=0?(n=++s,i-=a+1):i=a}return n}qr.default=gl});var ps=Pe(Jr=>{"use strict";Object.defineProperty(Jr,"__esModule",{value:!0});var yl=hs(),Kr=class{constructor(){this._queue=[]}enqueue(e,r){r=Object.assign({priority:0},r);let n={priority:r.priority,run:e};if(this.size&&this._queue[this.size-1].priority>=r.priority){this._queue.push(n);return}let i=yl.default(this._queue,n,(a,s)=>s.priority-a.priority);this._queue.splice(i,0,n)}dequeue(){let e=this._queue.shift();return e?.run}filter(e){return this._queue.filter(r=>r.priority===e.priority).map(r=>r.run)}get size(){return this._queue.length}};Jr.default=Kr});var Qr=Pe(Xr=>{"use strict";Object.defineProperty(Xr,"__esModule",{value:!0});var wl=cs(),ms=fs(),bl=ps(),Ut=()=>{},El=new ms.TimeoutError,Wr=class extends wl{constructor(e){var r,n,i,a;if(super(),this._intervalCount=0,this._intervalEnd=0,this._pendingCount=0,this._resolveEmpty=Ut,this._resolveIdle=Ut,e=Object.assign({carryoverConcurrencyCount:!1,intervalCap:1/0,interval:0,concurrency:1/0,autoStart:!0,queueClass:bl.default},e),!(typeof e.intervalCap=="number"&&e.intervalCap>=1))throw new TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${(n=(r=e.intervalCap)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:""}\` (${typeof e.intervalCap})`);if(e.interval===void 0||!(Number.isFinite(e.interval)&&e.interval>=0))throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${(a=(i=e.interval)===null||i===void 0?void 0:i.toString())!==null&&a!==void 0?a:""}\` (${typeof e.interval})`);this._carryoverConcurrencyCount=e.carryoverConcurrencyCount,this._isIntervalIgnored=e.intervalCap===1/0||e.interval===0,this._intervalCap=e.intervalCap,this._interval=e.interval,this._queue=new e.queueClass,this._queueClass=e.queueClass,this.concurrency=e.concurrency,this._timeout=e.timeout,this._throwOnTimeout=e.throwOnTimeout===!0,this._isPaused=e.autoStart===!1}get _doesIntervalAllowAnother(){return this._isIntervalIgnored||this._intervalCount<this._intervalCap}get _doesConcurrentAllowAnother(){return this._pendingCount<this._concurrency}_next(){this._pendingCount--,this._tryToStartAnother(),this.emit("next")}_resolvePromises(){this._resolveEmpty(),this._resolveEmpty=Ut,this._pendingCount===0&&(this._resolveIdle(),this._resolveIdle=Ut,this.emit("idle"))}_onResumeInterval(){this._onInterval(),this._initializeIntervalIfNeeded(),this._timeoutId=void 0}_isIntervalPaused(){let e=Date.now();if(this._intervalId===void 0){let r=this._intervalEnd-e;if(r<0)this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0;else return this._timeoutId===void 0&&(this._timeoutId=setTimeout(()=>{this._onResumeInterval()},r)),!0}return!1}_tryToStartAnother(){if(this._queue.size===0)return this._intervalId&&clearInterval(this._intervalId),this._intervalId=void 0,this._resolvePromises(),!1;if(!this._isPaused){let e=!this._isIntervalPaused();if(this._doesIntervalAllowAnother&&this._doesConcurrentAllowAnother){let r=this._queue.dequeue();return r?(this.emit("active"),r(),e&&this._initializeIntervalIfNeeded(),!0):!1}}return!1}_initializeIntervalIfNeeded(){this._isIntervalIgnored||this._intervalId!==void 0||(this._intervalId=setInterval(()=>{this._onInterval()},this._interval),this._intervalEnd=Date.now()+this._interval)}_onInterval(){this._intervalCount===0&&this._pendingCount===0&&this._intervalId&&(clearInterval(this._intervalId),this._intervalId=void 0),this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0,this._processQueue()}_processQueue(){for(;this._tryToStartAnother(););}get concurrency(){return this._concurrency}set concurrency(e){if(!(typeof e=="number"&&e>=1))throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${e}\` (${typeof e})`);this._concurrency=e,this._processQueue()}async add(e,r={}){return new Promise((n,i)=>{let a=async()=>{this._pendingCount++,this._intervalCount++;try{let s=this._timeout===void 0&&r.timeout===void 0?e():ms.default(Promise.resolve(e()),r.timeout===void 0?this._timeout:r.timeout,()=>{(r.throwOnTimeout===void 0?this._throwOnTimeout:r.throwOnTimeout)&&i(El)});n(await s)}catch(s){i(s)}this._next()};this._queue.enqueue(a,r),this._tryToStartAnother(),this.emit("add")})}async addAll(e,r){return Promise.all(e.map(async n=>this.add(n,r)))}start(){return this._isPaused?(this._isPaused=!1,this._processQueue(),this):this}pause(){this._isPaused=!0}clear(){this._queue=new this._queueClass}async onEmpty(){if(this._queue.size!==0)return new Promise(e=>{let r=this._resolveEmpty;this._resolveEmpty=()=>{r(),e()}})}async onIdle(){if(!(this._pendingCount===0&&this._queue.size===0))return new Promise(e=>{let r=this._resolveIdle;this._resolveIdle=()=>{r(),e()}})}get size(){return this._queue.size}sizeBy(e){return this._queue.filter(e).length}get pending(){return this._pendingCount}get isPaused(){return this._isPaused}get timeout(){return this._timeout}set timeout(e){this._timeout=e}};Xr.default=Wr});var xn=Object.defineProperty,P=(t,e)=>{let r={};for(var n in t)xn(r,n,{get:t[n],enumerable:!0});return e||xn(r,Symbol.toStringTag,{value:"Module"}),r};function Tn(t){let e=Symbol.for(t);return{brand(r,n){let i=n?Symbol.for(`${t}.${n}`):e;class a extends r{[i]=!0;constructor(...o){super(...o)}static isInstance(o){return typeof o=="object"&&o!==null&&i in o&&o[i]===!0}static[Symbol.hasInstance](o){return this.isInstance(o)}}return Object.defineProperty(a,"name",{value:r.name}),a},sub(r){return Tn(`${t}.${r}`)},isInstance(r){return typeof r=="object"&&r!==null&&e in r&&r[e]===!0}}}var An=Tn("langchain");var Iu=P({ContextOverflowError:()=>ao,LangChainError:()=>er,ModelAbortError:()=>io,addLangChainErrorFields:()=>Yt,getRetryable:()=>no,ns:()=>it,stampRetryable:()=>Zt});function Yt(t,e){return t.lc_error_code=e,t.message=`${t.message}
|
|
3
3
|
|
|
4
4
|
Troubleshooting URL: https://docs.langchain.com/oss/javascript/langchain/errors/${e}/
|
|
5
5
|
`,t}var it=An.sub("error"),In=Symbol.for("langchain.errors.retryable");function Zt(t,e){if(typeof t!="object"||t===null)return t;try{Object.defineProperty(t,In,{value:e,configurable:!0})}catch{}return t}function no(t){if(!(typeof t!="object"||t===null))return Object.getOwnPropertyDescriptor(t,In)?.value}var er=class extends it.brand(Error){name="LangChainError";constructor(t){super(t),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}},io=class extends it.brand(er,"model-abort"){name="ModelAbortError";partialOutput;constructor(t,e){super(t),this.partialOutput=e,Zt(this,!1)}},ao=class Cn extends it.brand(er,"context-overflow"){name="ContextOverflowError";cause;constructor(e){super(e??"Input exceeded the model's context window."),Zt(this,!1)}static fromError(e){let r=new Cn(e.message);return r.cause=e,r}};function On(t){return!!(t&&typeof t=="object"&&"type"in t&&t.type==="tool_call")}function Mu(t){return!!(t&&typeof t=="object"&&"toolCall"in t&&t.toolCall!=null&&typeof t.toolCall=="object"&&"id"in t.toolCall&&typeof t.toolCall.id=="string")}var Nu=class extends Error{output;constructor(t,e){super(t),this.output=e}};function Lu(t,e=tr){t=t.trim();let r=t.indexOf("```");if(r===-1)return e(t);let n=t.substring(r+3);n.startsWith(`json
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import c from"./
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import c from"./55FL7WQV.js";import b from"./T3RJKB2A.js";import"./QDWOQBO3.js";import{a as tl,c as rl,e as nl,f as sl,g as il}from"./UZCHLKLO.js";import{$ as Uc,A as Gt,B as jn,C as ze,D as vc,E as Sc,F as yi,G as Cc,H as kc,I as Ec,J as xc,K as Ic,L as Tc,M as Ac,N as Nc,O as Mc,P as _i,Q as Pc,R as Oc,S as Rc,T as Dc,U as $c,V as jc,W as Ln,X as Lc,Y as Fc,Z as gr,_ as Vc,a as Ja,aa as wi,b as Ya,ba as Gc,c as Za,ca as We,d as uc,da as Bc,e as Hr,ea as Hc,f as pc,fa as bi,g as hc,ga as qc,h as dc,ha as zc,i as Dn,ia as Wc,j as mc,ja as Kc,k as fc,l as gc,m as mr,n as mi,o as ge,p as qr,q as yc,r as fr,s as _c,t as fi,u as wc,v as ut,w as bc,x as gi,y as K,z as $n}from"./FTKD53UG.js";import{$a as Ee,Ba as qe,Ia as ec,J as ee,La as kt,Na as tc,Oa as rc,P as ci,Pa as hr,Qa as nc,R as Pe,S as li,Sa as sc,T as Qa,Ta as ic,Ua as oc,V as Ut,Va as ac,Wa as dr,Xa as di,Y as ui,Ya as Se,Za as cc,a as N,ab as lc,b as Fa,bb as lt,c as Gr,ca as pi,d as Br,e as Va,fa as te,g as ai,h as Ua,i as Ga,ia as ur,j as Ba,ja as hi,k as Ha,l as qa,m as za,n as Me,o as Wa,q as Ka,r as Xa,ra as Ct,s as On,va as pr,wa as Rn}from"./XOFCMJBQ.js";import"./25XJ66JO.js";import"./5YDITHQA.js";import a from"./F3ODJVJC.js";import"./VMQIDO4Z.js";import"./QS3GXAIH.js";import{a as Ur,b as ja,d as Pn}from"./2GBRZSEC.js";import{a as La}from"./XUPYBBRI.js";import"./C5U7YKVI.js";import"./6BMWSGLA.js";import{J as Fr,K as Vr,L as Da,R as $a,h as Pa,j as He,n as Oa,w as Ra}from"./CWSEBETE.js";import{a as Jc}from"./YUQFNMEZ.js";import"./R74ZHFA6.js";import"./UZLQALHY.js";export default $arcgis.t(([Nh,Mh,xg,,{a:Zc,b:el},{a:Yc,b:Xc,c:Qc}])=>{function ol(e,t){if(e!=null){if(typeof e!="number"||Number.isNaN(e)||e<=0)throw new Error(`${t} must be greater than 0`);return e}}function Bt(e){if(e==null)return;let t=typeof e=="number"?{runTimeout:e}:e,r=t.refreshOn??"auto";if(r!=="auto"&&r!=="heartbeat")throw new Error('refreshOn must be "auto" or "heartbeat"');let n=ol(t.runTimeout,"runTimeout"),s=ol(t.idleTimeout,"idleTimeout");if(!(n===void 0&&s===void 0))return{runTimeout:n,idleTimeout:s,refreshOn:r}}var U="__start__",L="__end__",Je="__input__";var Et="__error__",Wr="__error_source_node__",Fn="__pregel_ns_writes";function al(){let e=typeof process<"u"?process.env?.LANGGRAPH_DELTA_MAX_SUPERSTEPS_SINCE_SNAPSHOT:void 0;if(e!==void 0&&e!==""){let t=Number.parseInt(e,10);if(Number.isFinite(t)&&t>0)return t}return 5e3}var ae="__pregel_send",pt="__pregel_call",ue="__pregel_read",xe="__pregel_checkpointer",qt="__pregel_resuming",yr="__pregel_task_id",Kr="__pregel_stream",_d="__pregel_resume_value",zt="__pregel_resume_map",_e="__pregel_scratchpad",Wt="__pregel_previous",wd="__pregel_durability",xt="checkpoint_id",Ce="checkpoint_ns",cl="__pregel_node_finished",Jr="__pregel_node_error",ce="checkpoint_map",Vn="__pregel_replay_state",ll="__pregel_abort_signals",H="__interrupt__",pe="__resume__",Yr="__no_writes__",It="__return__",Tt="__previous__",X="langsmith:hidden";var Si="__self__",Ye="__pregel_tasks",he="__pregel_push",Un="__pregel_pull",de="00000000-0000-0000-0000-000000000000",ul=[X,Je,H,pe,Et,Wr,Yr,ae,ue,xe,wd,Kr,qt,yr,pt,_d,_e,Wt,ce,Ce,xt,Vn],vi=Symbol.for("langgraph.command"),pl=class{[vi];constructor(e){this[vi]=e}};function Gn(e){let t=e;return t!=null&&typeof t.node=="string"&&t.args!==void 0}var Ht=class{lg_name="Send";node;args;timeout;constructor(e,t,r){this.node=e,this.args=zr(t),this.timeout=Bt(r?.timeout)}toJSON(){return{lg_name:this.lg_name,node:this.node,args:this.args,timeout:this.timeout}}};function re(e){return e instanceof Ht}var Ke="__overwrite__",bd=class{lg_name="Overwrite";[Ke];constructor(e){this[Ke]=e}get value(){return this[Ke]}toJSON(){return{[Ke]:this[Ke]}}static isInstance(e){return!e||typeof e!="object"?!1:"__overwrite__"in e||"lg_name"in e&&e.lg_name==="Overwrite"}};function Oe(e){if(typeof e=="object"&&e!==null){if("__overwrite__"in e)return[!0,e[Ke]];let t=e;if(t.type==="__overwrite__"&&"value"in t)return[!0,t.value]}return[!1,void 0]}function Kt(e){return Oe(e)[0]}function Jt(e){return!e||typeof e!="object"||!("__interrupt__"in e)?!1:Array.isArray(e[H])}var ye=class extends pl{lg_name="Command";lc_direct_tool_output=!0;graph;update;resume;goto=[];static PARENT="__parent__";constructor(e){super(e),this.resume=e.resume,this.graph=e.graph,this.update=e.update,e.goto&&(this.goto=Array.isArray(e.goto)?zr(e.goto):[zr(e.goto)])}_updateAsTuples(){return this.update&&typeof this.update=="object"&&!Array.isArray(this.update)?Object.entries(this.update):Array.isArray(this.update)&&this.update.every(e=>Array.isArray(e)&&e.length===2&&typeof e[0]=="string")?this.update:[["__root__",this.update]]}toJSON(){let e;return typeof this.goto=="string"?e=this.goto:re(this.goto)?e=this.goto.toJSON():e=this.goto?.map(t=>typeof t=="string"?t:t.toJSON()),{lg_name:this.lg_name,update:this.update,resume:this.resume,goto:e}}};function ie(e){return typeof e!="object"||e==null?!1:"lg_name"in e&&e.lg_name==="Command"}function vd(e){let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function zr(e,t=new Map){if(e!=null&&typeof e=="object"){if(t.has(e))return t.get(e);let r;if(Array.isArray(e))r=[],t.set(e,r),e.forEach((n,s)=>{r[s]=zr(n,t)});else if(e instanceof ye||e instanceof Ht||!vd(e))r=e,t.set(e,r);else if(ie(e))r=new ye(e),t.set(e,r);else if(Gn(e))r=new Ht(e.node,e.args,e.timeout!==void 0?{timeout:e.timeout}:void 0),t.set(e,r);else if("lc_serializable"in e&&e.lc_serializable)r=e,t.set(e,r);else{r={},t.set(e,r);for(let[n,s]of Object.entries(e))r[n]=zr(s,t)}return r}return e}var Xe=class extends Error{lc_error_code;constructor(e,t){let r=e??"";t?.lc_error_code&&(r=`${r}
|
|
3
3
|
|
|
4
4
|
Troubleshooting URL: https://docs.langchain.com/oss/javascript/langgraph/${t.lc_error_code}/
|
|
5
5
|
`),super(r),this.lc_error_code=t?.lc_error_code}},Bn=class extends Xe{get is_bubble_up(){return!0}},Ci=class extends Xe{constructor(e,t){super(e,t),this.name="GraphRecursionError"}static get unminifiable_name(){return"GraphRecursionError"}},Yt=class extends Xe{constructor(e,t){super(e,t),this.name="GraphValueError"}static get unminifiable_name(){return"GraphValueError"}},Hn=class extends Bn{reason;constructor(e="shutdown",t){super(`Graph drained: ${e}`,t),this.name="GraphDrained",this.reason=e}static get unminifiable_name(){return"GraphDrained"}};function qn(e){return e!==void 0&&e.name===Hn.unminifiable_name}var ht=class extends Bn{interrupts;constructor(e,t){super(JSON.stringify(e,null,2),t),this.name="GraphInterrupt",this.interrupts=e??[]}static get unminifiable_name(){return"GraphInterrupt"}},At=class extends ht{constructor(e,t){super([{value:e}],t),this.name="NodeInterrupt"}static get unminifiable_name(){return"NodeInterrupt"}},ki=class{node;error;constructor(e,t){this.node=e,this.error=t}static get unminifiable_name(){return"NodeError"}};var zn=class extends Bn{command;constructor(e){super(),this.name="ParentCommand",this.command=e}static get unminifiable_name(){return"ParentCommand"}};function Ei(e){return e!==void 0&&e.name===zn.unminifiable_name}function Nt(e){return e!==void 0&&e.is_bubble_up===!0}function dt(e){return e!==void 0&&[ht.unminifiable_name,At.unminifiable_name].includes(e.name)}var xi=class extends Xe{node;kind;timeout;elapsed;runTimeout;idleTimeout;constructor(e,t){let{node:r,elapsed:n,kind:s,runTimeout:i,idleTimeout:o}=e,a,c;if(s==="idle"){if(o===void 0)throw new Error("idleTimeout is required when kind='idle'");c=o,a=`Node "${r}" exceeded its idle timeout of ${o}ms without making progress (elapsed: ${n}ms).`}else{if(i===void 0)throw new Error("runTimeout is required when kind='run'");c=i,a=`Node "${r}" exceeded its run timeout of ${i}ms (elapsed: ${n}ms).`}super(a,t),this.name="NodeTimeoutError",this.node=r,this.kind=s,this.timeout=c,this.elapsed=n,this.runTimeout=i,this.idleTimeout=o}static get unminifiable_name(){return"NodeTimeoutError"}};var Wn=class extends Xe{constructor(e,t){super(e,t),this.name="EmptyInputError"}static get unminifiable_name(){return"EmptyInputError"}},F=class extends Xe{constructor(e,t){let r=Error.stackTraceLimit;Error.stackTraceLimit=0,super(e,t),Error.stackTraceLimit=r,this.name="EmptyChannelError"}static get unminifiable_name(){return"EmptyChannelError"}},R=class extends Xe{constructor(e,t){super(e,t),this.name="InvalidUpdateError"}static get unminifiable_name(){return"InvalidUpdateError"}};var Ii=class extends Xe{constructor(e,t){super(e,t),this.name="UnreachableNodeError"}static get unminifiable_name(){return"UnreachableNodeError"}};var Xr=class extends Xe{constructor(e,t){super(e,t),this.name="StateGraphInputError",this.message="Invalid StateGraph input. Make sure to pass a valid StateDefinition, Annotation.Root, or Zod schema."}static get unminifiable_name(){return"StateGraphInputError"}};var Ti=0,Qr=0;function Zr(e){let t=Date.now();return t<=Ti?(Qr+=1,Qr>=1e4&&(Qr=0,t=Ti+1)):Qr=0,Ti=t,Va({clockseq:e,msecs:t,nsecs:Qr})}function Qe(e,t){let r=t.replace(/-/g,"").match(/.{2}/g).map(n=>parseInt(n,16));return Br(e,new Uint8Array(r))}var Ai="__error__",Xt="__scheduled__",Ni="__interrupt__",Mi="__resume__",_r=class{lg_name="DeltaSnapshot";value;constructor(e){this.value=e}};function Pi(e){return e!=null&&typeof e=="object"&&e.lg_name==="DeltaSnapshot"}var hl="[...]",Sd="[Circular]",Kn=[],wr=[];function Cd(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function dl(e,t,r,n){typeof n>"u"&&(n=Cd()),Ri(e,"",0,[],void 0,0,n);var s;try{wr.length===0?s=JSON.stringify(e,t,r):s=JSON.stringify(e,kd(t),r)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;Kn.length!==0;){var i=Kn.pop();i.length===4?Object.defineProperty(i[0],i[1],i[3]):i[0][i[1]]=i[2]}}return s}function Oi(e,t,r,n){var s=Object.getOwnPropertyDescriptor(n,r);s.get!==void 0?s.configurable?(Object.defineProperty(n,r,{value:e}),Kn.push([n,r,t,s])):wr.push([t,r,e]):(n[r]=e,Kn.push([n,r,t]))}function Ri(e,t,r,n,s,i,o){i+=1;var a;if(typeof e=="object"&&e!==null){for(a=0;a<n.length;a++)if(n[a]===e){Oi(Sd,e,t,s);return}if(typeof o.depthLimit<"u"&&i>o.depthLimit){Oi(hl,e,t,s);return}if(typeof o.edgesLimit<"u"&&r+1>o.edgesLimit){Oi(hl,e,t,s);return}if(n.push(e),Array.isArray(e))for(a=0;a<e.length;a++)Ri(e[a],a,a,n,e,i,o);else{var c=Object.keys(e);for(a=0;a<c.length;a++){var l=c[a];Ri(e[l],l,a,n,e,i,o)}}n.pop()}}function kd(e){return e=typeof e<"u"?e:function(t,r){return r},function(t,r){if(wr.length>0)for(var n=0;n<wr.length;n++){var s=wr[n];if(s[1]===t&&s[0]===r){r=s[2],wr.splice(n,1);break}}return e.call(this,t,r)}}var ml=[];var fl=N({});var gl=N({});var yl=N({BaseChatMessageHistory:()=>Di,BaseListChatMessageHistory:()=>Jn,InMemoryChatMessageHistory:()=>Ed}),Di=class extends Me{async addMessages(e){for(let t of e)await this.addMessage(t)}},Jn=class extends Me{addUserMessage(e){return this.addMessage(new Ct(e))}addAIMessage(e){return this.addMessage(new te(e))}async addMessages(e){for(let t of e)await this.addMessage(t)}clear(){throw new Error("Not implemented.")}},Ed=class extends Jn{lc_namespace=["langchain","stores","message","in_memory"];messages=[];constructor(e){super(...arguments),this.messages=e??[]}async getMessages(){return this.messages}async addMessage(e){this.messages.push(e)}async clear(){this.messages=[]}};var ke=class{pageContent;metadata;id;constructor(e){this.pageContent=e.pageContent!==void 0?e.pageContent.toString():"",this.metadata=e.metadata??{},this.id=e.id}};var $i=class extends K{lc_namespace=["langchain_core","documents","transformers"];invoke(e,t){return this.transformDocuments(e)}},_l=class extends $i{async transformDocuments(e){let t=[];for(let r of e){let n=await this._transformDocument(r);t.push(n)}return t}};var wl=N({BaseDocumentTransformer:()=>$i,Document:()=>ke,MappingDocumentTransformer:()=>_l});var bl=N({BaseDocumentLoader:()=>ji}),ji=class{};var vl=N({LangSmithLoader:()=>xd}),xd=class extends ji{datasetId;datasetName;exampleIds;asOf;splits;inlineS3Urls;offset;limit;metadata;filter;contentKey;formatContent;client;constructor(e){if(super(),e.client&&e.clientConfig)throw new Error("client and clientConfig cannot both be provided.");this.client=e.client??new tc(e?.clientConfig),this.contentKey=e.contentKey?e.contentKey.split("."):[],this.formatContent=e.formatContent??Id,this.datasetId=e.datasetId,this.datasetName=e.datasetName,this.exampleIds=e.exampleIds,this.asOf=e.asOf,this.splits=e.splits,this.inlineS3Urls=e.inlineS3Urls,this.offset=e.offset,this.limit=e.limit,this.metadata=e.metadata,this.filter=e.filter}async load(){let e=[];for await(let t of this.client.listExamples({datasetId:this.datasetId,datasetName:this.datasetName,exampleIds:this.exampleIds,asOf:this.asOf,splits:this.splits,inlineS3Urls:this.inlineS3Urls,offset:this.offset,limit:this.limit,metadata:this.metadata,filter:this.filter})){let r=t.inputs;for(let i of this.contentKey)r=r[i];let n=this.formatContent(r),s=t;["created_at","modified_at"].forEach(i=>{i in s&&typeof s[i]=="object"&&(s[i]=s[i].toString())}),e.push({pageContent:n,metadata:s})}return e}};function Id(e){if(typeof e=="string")return e;try{return JSON.stringify(e,null,2)}catch{return String(e)}}var br=class extends Me{lc_namespace=["langchain_core","example_selectors","base"]};var Li=class{async getPromptAsync(e,t){return this.getPrompt(e).partial(t?.partialVariables??{})}},Sl=class extends Li{defaultPrompt;conditionals;constructor(e,t=[]){super(),this.defaultPrompt=e,this.conditionals=t}getPrompt(e){for(let[t,r]of this.conditionals)if(t(e))return r;return this.defaultPrompt}};function Cl(e){return e._modelType()==="base_llm"}function kl(e){return e._modelType()==="base_chat_model"}function El(e){return e.split(/\n| /).length}var xl=class Il extends br{examples=[];examplePrompt;getTextLength=El;maxLength=2048;exampleTextLengths=[];constructor(t){super(t),this.examplePrompt=t.examplePrompt,this.maxLength=t.maxLength??2048,this.getTextLength=t.getTextLength??El}async addExample(t){this.examples.push(t);let r=await this.examplePrompt.format(t);this.exampleTextLengths.push(this.getTextLength(r))}async calculateExampleTextLengths(t,r){if(t.length>0)return t;let{examples:n,examplePrompt:s}=r;return(await Promise.all(n.map(i=>s.format(i)))).map(i=>this.getTextLength(i))}async selectExamples(t){let r=Object.values(t).join(" "),n=this.maxLength-this.getTextLength(r),s=0,i=[];for(;n>0&&s<this.examples.length;){let o=n-this.exampleTextLengths[s];if(o<0)break;i.push(this.examples[s]),n=o,s+=1}return i}static async fromExamples(t,r){let n=new Il(r);return await Promise.all(t.map(s=>n.addExample(s))),n}};function Fi(e){return Object.keys(e).sort().map(t=>e[t])}var Tl=class Al extends br{vectorStoreRetriever;exampleKeys;inputKeys;constructor(t){if(super(t),this.exampleKeys=t.exampleKeys,this.inputKeys=t.inputKeys,t.vectorStore!==void 0)this.vectorStoreRetriever=t.vectorStore.asRetriever({k:t.k??4,filter:t.filter});else if(t.vectorStoreRetriever)this.vectorStoreRetriever=t.vectorStoreRetriever;else throw new Error('You must specify one of "vectorStore" and "vectorStoreRetriever".')}async addExample(t){let r=Fi((this.inputKeys??Object.keys(t)).reduce((n,s)=>({...n,[s]:t[s]}),{})).join(" ");await this.vectorStoreRetriever.addDocuments([new ke({pageContent:r,metadata:t})])}async selectExamples(t){let r=Fi((this.inputKeys??Object.keys(t)).reduce((s,i)=>({...s,[i]:t[i]}),{})).join(" "),n=(await this.vectorStoreRetriever.invoke(r)).map(s=>s.metadata);return this.exampleKeys?n.map(s=>this.exampleKeys.reduce((i,o)=>({...i,[o]:s[o]}),{})):n}static async fromExamples(t,r,n,s={}){let i=s.inputKeys??null,o=t.map(c=>Fi(i?i.reduce((l,u)=>({...l,[u]:c[u]}),{}):c).join(" ")),a=await n.fromTexts(o,t,r,s);return new Al({vectorStore:a,k:s.k??4,exampleKeys:s.exampleKeys,inputKeys:s.inputKeys})}};var Nl=N({BaseExampleSelector:()=>br,BasePromptSelector:()=>Li,ConditionalPromptSelector:()=>Sl,LengthBasedExampleSelector:()=>xl,SemanticSimilarityExampleSelector:()=>Tl,isChatModel:()=>kl,isLLM:()=>Cl});var en="10f90ea3-90a4-4962-bf75-83a0f3c1c62a",Ml=class extends Me{lc_namespace=["langchain","recordmanagers"]};var Vi=class{uid;hash_;contentHash;metadataHash;pageContent;metadata;keyEncoder=Ja;constructor(e){this.uid=e.uid,this.pageContent=e.pageContent,this.metadata=e.metadata}makeDefaultKeyEncoder(e){this.keyEncoder=e}calculateHashes(){let e=["hash_","content_hash","metadata_hash"];for(let r of e)if(r in this.metadata)throw new Error(`Metadata cannot contain key ${r} as it is reserved for internal use. Restricted keys: [${e.join(", ")}]`);let t=this._hashStringToUUID(this.pageContent);try{let r=this._hashNestedDictToUUID(this.metadata);this.contentHash=t,this.metadataHash=r}catch(r){throw new Error(`Failed to hash metadata: ${r}. Please use a dict that can be serialized using json.`)}this.hash_=this._hashStringToUUID(this.contentHash+this.metadataHash),this.uid||(this.uid=this.hash_)}toDocument(){return new ke({pageContent:this.pageContent,metadata:this.metadata})}static fromDocument(e,t){let r=new this({pageContent:e.pageContent,metadata:e.metadata,uid:t||e.uid});return r.calculateHashes(),r}_hashStringToUUID(e){return Br(this.keyEncoder(e),en)}_hashNestedDictToUUID(e){let t=JSON.stringify(e,Object.keys(e).sort());return Br(this.keyEncoder(t),en)}};function Ui(e,t){let r=[],n=[];return t.forEach(s=>{n.push(s),n.length>=e&&(r.push(n),n=[])}),n.length>0&&r.push(n),r}function Gi(e){let t=new Set,r=[];for(let n of e){if(!n.hash_)throw new Error("Hashed document does not have a hash");t.has(n.hash_)||(t.add(n.hash_),r.push(n))}return r}function Bi(e){if(e===null)return t=>null;if(typeof e=="string")return t=>t.metadata[e];if(typeof e=="function")return e;throw new Error(`sourceIdKey should be null, a string or a function, got ${typeof e}`)}var Hi=e=>"load"in e&&typeof e.load=="function"&&"loadAndSplit"in e&&typeof e.loadAndSplit=="function";async function Pl(e){let{docsSource:t,recordManager:r,vectorStore:n,options:s}=e,{batchSize:i=100,cleanup:o,sourceIdKey:a,cleanupBatchSize:c=1e3,forceUpdate:l=!1}=s??{};if(o==="incremental"&&!a)throw new Error("sourceIdKey is required when cleanup mode is incremental. Please provide through 'options.sourceIdKey'.");let u=Hi(t)?await t.load():t,p=Bi(a??null),h=await r.getTime(),d=0,m=0,f=0,g=0,y=Ui(i??100,u);for(let _ of y){let S=Gi(_.map(x=>Vi.fromDocument(x))),C=S.map(x=>p(x));o==="incremental"&&S.forEach((x,G)=>{if(C[G]===null)throw new Error("sourceIdKey must be provided when cleanup is incremental")});let I=await r.exists(S.map(x=>x.uid)),M=[],k=[],v=[],T=new Set;if(S.forEach((x,G)=>{if(I[G])if(l)T.add(x.uid);else{v.push(x.uid);return}M.push(x.uid),k.push(x.toDocument())}),v.length>0&&(await r.update(v,{timeAtLeast:h}),g+=v.length),k.length>0&&(await n.addDocuments(k,{ids:M}),d+=k.length-T.size,f+=T.size),await r.update(S.map(x=>x.uid),{timeAtLeast:h,groupIds:C}),o==="incremental"){C.forEach(G=>{if(!G)throw new Error("Source id cannot be null")});let x=await r.listKeys({before:h,groupIds:C});x.length>0&&(await n.delete({ids:x}),await r.deleteKeys(x),m+=x.length)}}if(o==="full"){let _=await r.listKeys({before:h,limit:c});for(;_.length>0;)await n.delete({ids:_}),await r.deleteKeys(_),m+=_.length,_=await r.listKeys({before:h,limit:c})}return{numAdded:d,numDeleted:m,numUpdated:f,numSkipped:g}}var Ol=N({RecordManager:()=>Ml,UUIDV5_NAMESPACE:()=>en,_HashedDocument:()=>Vi,_batch:()=>Ui,_deduplicateInOrder:()=>Gi,_getSourceIdAssigner:()=>Bi,_isBaseDocumentLoader:()=>Hi,index:()=>Pl});var Rl=N({});var Dl=N({});var $l=N({BaseMemory:()=>Td,getInputValue:()=>Ad,getOutputValue:()=>Nd,getPromptInputKey:()=>Md}),Td=class{},jl=(e,t)=>{if(t!==void 0)return e[t];let r=Object.keys(e);if(r.length===1)return e[r[0]]},Ad=(e,t)=>{let r=jl(e,t);if(!r){let n=Object.keys(e);throw new Error(`input values have ${n.length} keys, you must specify an input key or pass only 1 key as input`)}return r},Nd=(e,t)=>{let r=jl(e,t);if(!r&&r!==""){let n=Object.keys(e);throw new Error(`output values have ${n.length} keys, you must specify an output key or pass only 1 key as output`)}return r};function Md(e,t){let r=Object.keys(e).filter(n=>!t.includes(n)&&n!=="stop");if(r.length!==1)throw new Error(`One input key expected, but got ${r.length}`);return r[0]}var qi=class extends _i{static lc_name(){return"OutputFunctionsParser"}lc_namespace=["langchain","output_parsers","openai_functions"];lc_serializable=!0;argsOnly=!0;constructor(e){super(),this.argsOnly=e?.argsOnly??this.argsOnly}async parseResult(e){if("message"in e[0]){let t=e[0].message.additional_kwargs.function_call;if(!t)throw new Error(`No function_call in message ${JSON.stringify(e)}`);if(!t.arguments)throw new Error(`No arguments in function_call ${JSON.stringify(e)}`);return this.argsOnly?t.arguments:JSON.stringify(t)}else throw new Error(`No message in generations ${JSON.stringify(e)}`)}},zi=class extends Oc{static lc_name(){return"JsonOutputFunctionsParser"}lc_namespace=["langchain","output_parsers","openai_functions"];lc_serializable=!0;outputParser;argsOnly=!0;constructor(e){super(e),this.argsOnly=e?.argsOnly??this.argsOnly,this.outputParser=new qi(e)}_diff(e,t){if(t)return pc(e??{},t)}async parsePartialResult(e){let t=e[0];if(!t.message)return;let{message:r}=t,n=r.additional_kwargs.function_call;if(n)return this.argsOnly?pi(n.arguments):{...n,arguments:pi(n.arguments)}}async parseResult(e){let t=await this.outputParser.parseResult(e);if(!t)throw new Error(`No result from "OutputFunctionsParser" ${JSON.stringify(e)}`);return this.parse(t)}async parse(e){let t=JSON.parse(e);return this.argsOnly||(t.arguments=JSON.parse(t.arguments)),t}getFormatInstructions(){return""}},Ll=class extends _i{static lc_name(){return"JsonKeyOutputFunctionsParser"}lc_namespace=["langchain","output_parsers","openai_functions"];lc_serializable=!0;outputParser=new zi;attrName;get lc_aliases(){return{attrName:"key_name"}}constructor(e){super(e),this.attrName=e.attrName}async parseResult(e){return(await this.outputParser.parseResult(e))[this.attrName]}};var Fl=N({JsonKeyOutputFunctionsParser:()=>Ll,JsonOutputFunctionsParser:()=>zi,OutputFunctionsParser:()=>qi});var Ze=class extends K{lc_serializable=!0;lc_namespace=["langchain_core","prompts",this._getPromptType()];get lc_attributes(){return{partialVariables:void 0}}inputVariables;outputParser;partialVariables;metadata;tags;constructor(e){super(e);let{inputVariables:t}=e;if(t.includes("stop"))throw new Error("Cannot have an input variable named 'stop', as it is used internally, please rename.");Object.assign(this,e)}async mergePartialAndUserVariables(e){let t=this.partialVariables??{},r={};for(let[n,s]of Object.entries(t))typeof s=="string"?r[n]=s:r[n]=await s();return{...r,...e}}async invoke(e,t){let r={...this.metadata,...t?.metadata},n=[...this.tags??[],...t?.tags??[]];return this._callWithConfig(s=>this.formatPromptValue(s),e,{...t,tags:n,metadata:r,runType:"prompt"})}};var mt=class extends Ze{async formatPromptValue(e){return new kc(await this.format(e))}};var Pd=Object.prototype.toString,Sr=Array.isArray||function(t){return Pd.call(t)==="[object Array]"};function Ki(e){return typeof e=="function"}function Od(e){return Sr(e)?"array":typeof e}function Wi(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Vl(e,t){return e!=null&&typeof e=="object"&&t in e}function Rd(e,t){return e!=null&&typeof e!="object"&&e.hasOwnProperty&&e.hasOwnProperty(t)}var Dd=RegExp.prototype.test;function $d(e,t){return Dd.call(e,t)}var jd=/\S/;function Ld(e){return!$d(jd,e)}var Fd={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};function Vd(e){return String(e).replace(/[&<>"'`=\/]/g,function(r){return Fd[r]})}var Ud=/\s*/,Gd=/\s+/,Ul=/\s*=/,Bd=/\s*\}/,Hd=/#|\^|\/|>|\{|&|=|!/;function qd(e,t){if(!e)return[];var r=!1,n=[],s=[],i=[],o=!1,a=!1,c="",l=0;function u(){if(o&&!a)for(;i.length;)delete s[i.pop()];else i=[];o=!1,a=!1}var p,h,d;function m(v){if(typeof v=="string"&&(v=v.split(Gd,2)),!Sr(v)||v.length!==2)throw new Error("Invalid tags: "+v);p=new RegExp(Wi(v[0])+"\\s*"),h=new RegExp("\\s*"+Wi(v[1])),d=new RegExp("\\s*"+Wi("}"+v[1]))}m(t||Ie.tags);for(var f=new rn(e),g,y,_,S,C,I;!f.eos();){if(g=f.pos,_=f.scanUntil(p),_)for(var M=0,k=_.length;M<k;++M)S=_.charAt(M),Ld(S)?(i.push(s.length),c+=S):(a=!0,r=!0,c+=" "),s.push(["text",S,g,g+1]),g+=1,S===`
|
|
@@ -129,11 +129,11 @@ data: ${JSON.stringify({message:String(n)})}
|
|
|
129
129
|
|
|
130
130
|
`))}finally{r.close()}}})}var uh=class{static subscribeTo(e,t){let{key:r,tags:n}={key:void 0,tags:void 0,...t??{}};if(Array.isArray(e)&&r!==void 0)throw new Error("Can't specify a key when subscribing to multiple channels");let s;return typeof e=="string"?r?s={[r]:e}:s=[e]:s=Object.fromEntries(e.map(i=>[i,i])),new Fe({channels:s,triggers:Array.isArray(e)?e:[e],tags:n})}static writeTo(e,t){let r=[];for(let n of e)r.push({channel:n,value:be,skipNone:!1});for(let[n,s]of Object.entries(t??{}))K.isRunnable(s)||typeof s=="function"?r.push({channel:n,value:be,skipNone:!0,mapper:ze(s)}):r.push({channel:n,value:s,skipNone:!1});return new Y(r)}},lg=class extends K{lc_namespace=["langgraph","pregel"];invoke(e,t){throw new Error("Not implemented")}withConfig(e){return super.withConfig(e)}stream(e,t){return super.stream(e,t)}},Js=class extends lg{static lc_name(){return"LangGraph"}lc_namespace=["langgraph","pregel"];lg_is_pregel=!0;nodes;channels;inputChannels;outputChannels;autoValidate=!0;streamMode=["values"];streamChannels;interruptAfter;interruptBefore;stepTimeout;debug=!1;checkpointer;retryPolicy;config;store;cache;userInterrupt;streamTransformers;triggerToNodes={};constructor(e){super(e);let{streamMode:t}=e;if(t!=null&&!Array.isArray(t)&&(t=[t]),this.nodes=e.nodes,this.channels=e.channels,"__pregel_tasks"in this.channels&&"lc_graph_name"in this.channels.__pregel_tasks&&this.channels.__pregel_tasks.lc_graph_name!=="Topic")throw new Error(`Channel '${Ye}' is reserved and cannot be used in the graph.`);this.channels[Ye]=new ua({accumulate:!1}),this.autoValidate=e.autoValidate??this.autoValidate,this.streamMode=t??this.streamMode,this.inputChannels=e.inputChannels,this.outputChannels=e.outputChannels,this.streamChannels=e.streamChannels??this.streamChannels,this.interruptAfter=e.interruptAfter,this.interruptBefore=e.interruptBefore,this.stepTimeout=e.stepTimeout??this.stepTimeout,this.debug=e.debug??this.debug,this.checkpointer=e.checkpointer,this.retryPolicy=e.retryPolicy,this.config=e.config,this.store=e.store,this.cache=e.cache,this.name=e.name,this.triggerToNodes=e.triggerToNodes??this.triggerToNodes,this.userInterrupt=e.userInterrupt,this.streamTransformers=e.streamTransformers??[],this.autoValidate&&this.validate()}withConfig(e){let{streamTransformers:t,...r}=e,n=Ee(this.config,r),s=[...this.streamTransformers,...t??[]];return new this.constructor({...this,config:n,streamTransformers:s})}validate(){ch({nodes:this.nodes,channels:this.channels,outputChannels:this.outputChannels,inputChannels:this.inputChannels,streamChannels:this.streamChannels,interruptAfterNodes:this.interruptAfter,interruptBeforeNodes:this.interruptBefore});for(let[e,t]of Object.entries(this.nodes))for(let r of t.triggers)this.triggerToNodes[r]??=[],this.triggerToNodes[r].push(e);return this}get streamChannelsList(){return Array.isArray(this.streamChannels)?this.streamChannels:this.streamChannels?[this.streamChannels]:Object.keys(this.channels)}get streamChannelsAsIs(){return this.streamChannels?this.streamChannels:Object.keys(this.channels)}async getGraphAsync(e){return this.getGraph(e)}*getSubgraphs(e,t){for(let[r,n]of Object.entries(this.nodes)){if(e!==void 0&&!e.startsWith(r))continue;let s=n.subgraphs?.length?n.subgraphs:[n.bound];for(let i of s){let o=Ls(i);if(o!==void 0){if(r===e){yield[r,o];return}if(e===void 0&&(yield[r,o]),t){let a=e;e!==void 0&&(a=e.slice(r.length+1));for(let[c,l]of o.getSubgraphs(a,t))yield[`${r}|${c}`,l]}}}}}async*getSubgraphsAsync(e,t){yield*this.getSubgraphs(e,t)}async _prepareStateSnapshot({config:e,saved:t,subgraphCheckpointer:r,applyPendingWrites:n=!1}){if(t===void 0)return{values:{},next:[],config:e,tasks:[]};let s=await Ar(this.channels,t.checkpoint,{saver:typeof this.checkpointer=="object"?this.checkpointer:void 0,config:t.config??e});if(t.pendingWrites?.length){let p=t.pendingWrites.filter(([h,d])=>h===de).map(([h,d,m])=>[String(d),m]);p.length>0&&fe(t.checkpoint,s,[{name:Je,writes:p,triggers:[]}],void 0,this.triggerToNodes)}let i=Object.values(Dt(t.checkpoint,t.pendingWrites,this.nodes,s,t.config,!0,{step:(t.metadata?.step??-1)+1,store:this.store})),o=await Le(this.getSubgraphsAsync()),a=t.config.configurable?.checkpoint_ns??"",c={};for(let p of i){let h=o.find(([m])=>m===p.name);if(!h)continue;let d=`${String(p.name)}:${p.id}`;if(a&&(d=`${a}|${d}`),r===void 0){let m={configurable:{thread_id:t.config.configurable?.thread_id,checkpoint_ns:d}};c[p.id]=m}else{let m={configurable:{[xe]:r,thread_id:t.config.configurable?.thread_id,checkpoint_ns:d}},f=h[1];c[p.id]=await f.getState(m,{subgraphs:!0})}}if(n&&t.pendingWrites?.length){let p=Object.fromEntries(i.map(d=>[d.id,d]));for(let[d,m,f]of t.pendingWrites)["__error__","__interrupt__",Xt].includes(m)||d in p&&p[d].writes.push([String(m),f]);let h=i.filter(d=>d.writes.length>0);h.length>0&&fe(t.checkpoint,s,h,void 0,this.triggerToNodes)}let l=t?.metadata;l&&t?.config?.configurable?.thread_id&&(l={...l,thread_id:t.config.configurable.thread_id});let u=i.filter(p=>p.writes.length===0).map(p=>p.name);return{values:Ve(s,this.streamChannelsAsIs),next:u,tasks:ra(i,t?.pendingWrites??[],c,this.streamChannelsAsIs),metadata:l,config:Ot(t.config,t.metadata),createdAt:t.checkpoint.ts,parentConfig:t.parentConfig}}async getState(e,t){let r=e.configurable?.__pregel_checkpointer??this.checkpointer;if(!r)throw new Yt("No checkpointer set",{lc_error_code:"MISSING_CHECKPOINTER"});let n=e.configurable?.checkpoint_ns??"";if(n!==""&&e.configurable?.__pregel_read===void 0&&e.configurable?.__pregel_checkpointer===void 0){let o=xs(n);for await(let[a,c]of this.getSubgraphsAsync(o,!0))if(a===o)return await c.getState(rr(e,{[xe]:r}),{subgraphs:t?.subgraphs})}let s=Ee(this.config,e),i=await r.getTuple(e);return await this._prepareStateSnapshot({config:s,saved:i,subgraphCheckpointer:t?.subgraphs?r:void 0,applyPendingWrites:!e.configurable?.checkpoint_id})}async*getStateHistory(e,t){let r=e.configurable?.__pregel_checkpointer??this.checkpointer;if(!r)throw new Yt("No checkpointer set",{lc_error_code:"MISSING_CHECKPOINTER"});let n=e.configurable?.checkpoint_ns??"";if(n!==""&&e.configurable?.__pregel_checkpointer===void 0){let i=xs(n);for await(let[o,a]of this.getSubgraphsAsync(i,!0))if(o===i){yield*a.getStateHistory(rr(e,{[xe]:r}),t);return}}let s=Ee(this.config,e,{configurable:{checkpoint_ns:n}});for await(let i of r.list(s,t))yield this._prepareStateSnapshot({config:i.config,saved:i})}async bulkUpdateState(e,t){let r=e.configurable?.__pregel_checkpointer??this.checkpointer;if(!r)throw new Yt("No checkpointer set",{lc_error_code:"MISSING_CHECKPOINTER"});if(t.length===0)throw new Error("No supersteps provided");if(t.some(o=>o.updates.length===0))throw new Error("No updates provided");let n=e.configurable?.checkpoint_ns??"";if(n!==""&&e.configurable?.__pregel_checkpointer===void 0){let o=xs(n);for await(let[,a]of this.getSubgraphsAsync(o,!0))return await a.bulkUpdateState(rr(e,{[xe]:r}),t);throw new Error(`Subgraph "${o}" not found`)}let s=async(o,a)=>{let c=this.config?Ee(this.config,o):o,l=await r.getTuple(c),u=l!==void 0?et(l.checkpoint):er(),p={...l?.checkpoint.channel_versions},h=l?.metadata?.step??-1,d=rr(c,{checkpoint_ns:c.configurable?.checkpoint_ns??""}),m=c.metadata??{};l?.config.configurable&&(d=rr(c,l.config.configurable),m={...l.metadata,...m});let{values:f,asNode:g}=a[0];if(f==null&&g===void 0){if(a.length>1)throw new R("Cannot create empty checkpoint with multiple updates");return Ot(await r.put(d,$e(u,void 0,h),{source:"update",step:h+1,parents:l?.metadata?.parents??{}},{}),l?l.metadata:void 0)}let y=await Ar(this.channels,u,{saver:r,config:l?.config??d});if(f===null&&g==="__end__"){if(a.length>1)throw new R("Cannot apply multiple updates when clearing state");if(l){let k=Dt(u,l.pendingWrites||[],this.nodes,y,l.config,!0,{step:(l.metadata?.step??-1)+1,checkpointer:r,store:this.store}),v=(l.pendingWrites||[]).filter(T=>T[0]===de).map(T=>T.slice(1));v.length>0&&fe(u,y,[{name:Je,writes:v,triggers:[]}],r.getNextVersion.bind(r),this.triggerToNodes);for(let[T,x,G]of l.pendingWrites||[])["__error__","__interrupt__",Xt].includes(x)||T in k&&k[T].writes.push([x,G]);fe(u,y,Object.values(k),r.getNextVersion.bind(r),this.triggerToNodes)}return Ot(await r.put(d,$e(u,y,h),{...m,source:"update",step:h+1,parents:l?.metadata?.parents??{}},Dr(p,u.channel_versions)),l?l.metadata:void 0)}if(g==="__copy__"){if(a.length>1)throw new R("Cannot copy checkpoint with multiple updates");if(l==null)throw new R("Cannot copy a non-existent checkpoint");let k=x=>!Array.isArray(x)||x.length===0?!1:x.every(G=>Array.isArray(G)&&G.length===2),v=$e(u,void 0,h),T=await r.put(l.parentConfig??rr(l.config,{checkpoint_id:void 0}),v,{source:"fork",step:h+1,parents:l.metadata?.parents??{}},{});if(k(f)){let x=Dt(v,l.pendingWrites,this.nodes,y,T,!1,{step:h+2}),G=Object.values(x).reduce((V,{name:W,id:ve})=>(V[W]??=[],V[W].push({id:ve}),V),{}),$=f.reduce((V,W)=>{let[ve,ct]=W;V[ct]??=[];let E=V[ct].length,A=G[ct]?.[E]?.id;return V[ct].push({values:ve,asNode:ct,taskId:A}),V},{});return s(Ot(T,l.metadata),Object.values($).flat())}return Ot(T,l.metadata)}if(g==="__input__"){if(a.length>1)throw new R("Cannot apply multiple updates when updating as input");let k=await Le(Fs(this.inputChannels,f));if(k.length===0)throw new R(`Received no input writes for ${JSON.stringify(this.inputChannels,null,2)}`);fe(u,y,[{name:Je,writes:k,triggers:[]}],r.getNextVersion.bind(this.checkpointer),this.triggerToNodes);let v=l?.metadata?.step!=null?l.metadata.step+1:-1,T=await r.put(d,$e(u,y,v),{source:"input",step:v,parents:l?.metadata?.parents??{}},Dr(p,u.channel_versions));return await r.putWrites(T,k,Qe(Je,u.id)),Ot(T,l?l.metadata:void 0)}if(c.configurable?.checkpoint_id===void 0&&l?.pendingWrites!==void 0&&l.pendingWrites.length>0){let k=Dt(u,l.pendingWrites,this.nodes,y,l.config,!0,{store:this.store,checkpointer:this.checkpointer,step:(l.metadata?.step??-1)+1}),v=(l.pendingWrites??[]).filter(x=>x[0]===de).map(x=>x.slice(1));v.length>0&&fe(l.checkpoint,y,[{name:Je,writes:v,triggers:[]}],void 0,this.triggerToNodes);for(let[x,G,$]of l.pendingWrites)["__error__","__interrupt__",Xt].includes(G)||k[x]===void 0||k[x].writes.push([G,$]);let T=Object.values(k).filter(x=>x.writes.length>0);T.length>0&&fe(u,y,T,void 0,this.triggerToNodes)}let _=Object.values(u.versions_seen).map(k=>Object.values(k)).flat().find(k=>!!k),S=[];if(a.length===1){let{values:k,asNode:v,taskId:T}=a[0];if(v===void 0&&Object.keys(this.nodes).length===1)[v]=Object.keys(this.nodes);else if(v===void 0&&_===void 0)typeof this.inputChannels=="string"&&this.nodes[this.inputChannels]!==void 0&&(v=this.inputChannels);else if(v===void 0){let x=Object.entries(u.versions_seen).map(([G,$])=>Object.values($).map(V=>[V,G])).flat().filter(([G,$])=>$!==H).sort(([G],[$])=>gs(G,$));x&&(x.length===1?v=x[0][1]:x[x.length-1][0]!==x[x.length-2][0]&&(v=x[x.length-1][1]))}if(v===void 0)throw new R('Ambiguous update, specify "asNode"');S.push({values:k,asNode:v,taskId:T})}else for(let{asNode:k,values:v,taskId:T}of a){if(k==null)throw new R('"asNode" is required when applying multiple updates');S.push({values:v,asNode:k,taskId:T})}let C=[];for(let{asNode:k,values:v,taskId:T}of S){if(this.nodes[k]===void 0)throw new R(`Node "${k.toString()}" does not exist`);let x=this.nodes[k].getWriters();if(!x.length)throw new R(`No writers found for node "${k.toString()}"`);C.push({name:k,input:v,proc:x.length>1?Gt.from(x,{omitSequenceTags:!0}):x[0],writes:[],triggers:[H],id:T??Qe("__interrupt__",u.id),writers:[]})}for(let k of C)await k.proc.invoke(k.input,lt({...c,store:c?.store??this.store},{runName:c.runName??`${this.getName()}UpdateState`,configurable:{[ae]:v=>k.writes.push(...v),[ue]:(v,T=!1)=>$r(u,y,k,v,T)}}));for(let k of C){let v=k.writes.filter(T=>T[0]!==he);l!==void 0&&v.length>0&&await r.putWrites(d,v,k.id)}fe(u,y,C,r.getNextVersion.bind(this.checkpointer),this.triggerToNodes);let I=Dr(p,u.channel_versions),M=await r.put(d,$e(u,y,h+1),{source:"update",step:h+1,parents:l?.metadata?.parents??{}},I);for(let k of C){let v=k.writes.filter(T=>T[0]===he);v.length>0&&await r.putWrites(M,v,k.id)}return Ot(M,l?l.metadata:void 0)},i=e;for(let{updates:o}of t)i=await s(i,o);return i}async updateState(e,t,r){return this.bulkUpdateState(e,[{updates:[{values:t,asNode:r}]}])}_defaults(e){let{debug:t,streamMode:r,inputKeys:n,outputKeys:s,interruptAfter:i,interruptBefore:o,...a}=e,c=!0,l=t!==void 0?t:this.debug,u=s;u===void 0?u=this.streamChannelsAsIs:la(u,this.channels);let p=n;p===void 0?p=this.inputChannels:la(p,this.channels);let h=o??this.interruptBefore??[],d=i??this.interruptAfter??[],m;r!==void 0?(m=Array.isArray(r)?r:[r],c=typeof r=="string"):(e.configurable?.__pregel_task_id!==void 0?m=["values"]:m=this.streamMode,c=!0);let f;if(this.checkpointer===!1)f=void 0;else if(e!==void 0&&e.configurable?.__pregel_checkpointer!==void 0)f=e.configurable[xe];else{if(this.checkpointer===!0)throw new Error("checkpointer: true cannot be used for root graphs.");f=this.checkpointer}let g=e.store??this.store,y=e.cache??this.cache;if(e.durability!=null&&e.checkpointDuring!=null)throw new Error("Cannot use both `durability` and `checkpointDuring` at the same time.");let _=(()=>{if(e.checkpointDuring!=null)return e.checkpointDuring===!1?"exit":"async"})(),S=e.durability??_??e?.configurable?.__pregel_durability??"async";return[l,m,p,u,a,h,d,f,g,c,y,S]}async stream(e,t){let r=new AbortController,n=Es()?.configurable;n?.__pregel_read!==void 0&&t?.configurable?.__pregel_read===void 0&&(t={...t,configurable:{...n,...t?.configurable}});let s={recursionLimit:this.config?.recursionLimit,...t,signal:Rt(t?.signal,r.signal).signal},i=await super.stream(e,s);return new zs(t?.encoding==="text/event-stream"?Kp(i):i,r)}async#e(e,t){let{version:r,encoding:n,transformers:s,...i}=t,o={recursionLimit:this.config?.recursionLimit,...i,configurable:{...this.config?.configurable,...i?.configurable},version:r,streamMode:jo,subgraphs:!0,encoding:void 0},a=this.stream(e,o),c=Ko({[Symbol.asyncIterator]:async function*(){let l=await a;for await(let u of l)yield u}},[...this.streamTransformers??[],...s??[]]);if(n==="text/event-stream"){let l=new AbortController;return l.signal.addEventListener("abort",()=>c.abort(l.signal.reason),{once:!0}),new zs(cg(c),l)}return c}streamEvents(e,t,r){if(t.version==="v3")return this.#e(e,t);let n=new AbortController,s={recursionLimit:this.config?.recursionLimit,...t,signal:Rt(t?.signal,n.signal).signal};return new zs(super.streamEvents(e,s,r),n)}async _validateInput(e){return e}async _validateContext(e){return e}async*_streamIterator(e,t){let r="version"in(t??{})?void 0:t?.encoding??void 0,n=t?.subgraphs,s=t?.version==="v3",i=bn(this.config,t);if(i.recursionLimit===void 0||i.recursionLimit<1)throw new Error('Passed "recursionLimit" must be at least 1.');if(this.checkpointer!==void 0&&this.checkpointer!==!1&&i.configurable===void 0)throw new Error('Checkpointer requires one or more of the following "configurable" keys: "thread_id", "checkpoint_ns", "checkpoint_id"');let o=await this._validateInput(e),{runId:a,...c}=i,[l,u,,p,h,d,m,f,g,y,_,S]=this._defaults(c);h.metadata={ls_integration:"langgraph",...h.metadata},typeof h.context<"u"?h.context=await this._validateContext(h.context):h.configurable=await this._validateContext(h.configurable);let C=new sa({modes:new Set(u)});if(this.checkpointer===!0){h.configurable??={};let $=h.configurable.checkpoint_ns??"";h.configurable[Ce]=$.split("|").map(V=>V.split(":")[0]).join("|")}if(u.includes("messages")){let $=s?new ih(W=>C.push(W)):new rh(W=>C.push(W)),{callbacks:V}=h;if(V===void 0)h.callbacks=[$];else if(Array.isArray(V))h.callbacks=V.concat($);else{let W=V.copy();W.addHandler($,!0),h.callbacks=W}}if(u.includes("tools")){let $=new Wp(W=>C.push(W)),{callbacks:V}=h;if(V===void 0)h.callbacks=[$];else if(Array.isArray(V))h.callbacks=V.concat($);else{let W=V.copy();W.addHandler($,!0),h.callbacks=W}}h.writer??=$=>{if(!u.includes("custom"))return;let V=Es()?.configurable?.[Ce]?.split("|").slice(0,-1);C.push([V??[],"custom",$])},h.interrupt??=this.userInterrupt??Qo,h.serverInfo==null&&(h.serverInfo=ug(h)),h.control??=new $o;let I={tracerInheritableMetadata:dg(h)},M=await(await dr._configureSync(h?.callbacks,void 0,h?.tags,void 0,h?.metadata,void 0,I))?.handleChainStart(this.toJSON(),Pp(e,"input"),a,void 0,void 0,void 0,h?.runName??this.getName()),k=Tr(this.channels),v,T,G=(async()=>{try{v=await Zp.initialize({input:o,config:h,checkpointer:f,nodes:this.nodes,channelSpecs:k,outputKeys:p,streamKeys:this.streamChannelsAsIs,store:g,cache:_,stream:C,interruptAfter:m,interruptBefore:d,manager:M,debug:this.debug,triggerToNodes:this.triggerToNodes,durability:S});let $=new ah({loop:v,nodeFinished:h.configurable?.[cl]});t?.subgraphs&&(v.config.configurable={...v.config.configurable,[Kr]:v.stream}),await this._runLoop({loop:v,runner:$,debug:l,config:h}),S==="sync"&&await Promise.all(v?.checkpointerPromises??[])}catch($){T=$}finally{try{v&&(await v.store?.stop(),await v.cache?.stop()),await Promise.all(v?.checkpointerPromises??[])}catch($){T=T??$}T?(await new Promise($=>{queueMicrotask($)}),C.error(T)):C.close()}})();try{for await(let $ of C){if($===void 0)throw new Error("Data structure error.");let[V,W,ve]=$,ct="version"in(t??{});if(u.includes(W)||W==="checkpoints"&&Nr(ve)&&(s||ct&&n&&u.includes("values"))){if(r==="text/event-stream"){n?yield[V,W,ve]:yield[null,W,ve];continue}n&&!y?yield[V,W,ve]:y?n?yield[V,ve]:yield ve:yield[W,ve]}}}catch($){throw await M?.handleChainError(T),$}finally{await G}await M?.handleChainEnd(v?.output??{},a,void 0,void 0,void 0)}async invoke(e,t){let r=t?.streamMode??"values",n={...t,outputKeys:t?.outputKeys??this.outputChannels,streamMode:r,encoding:void 0},s=[],i=await this.stream(e,n),o=[],a;for await(let c of i)r==="values"?Jt(c)?o.push(c[H]):a=c:s.push(c);if(r==="values"){if(o.length>0){let c=o.flat(1);if(a==null)return{[H]:c};if(typeof a=="object")return{...a,[H]:c}}return a}return s}async _runLoop(e){let{loop:t,runner:r,debug:n,config:s}=e,i;try{for(;await t.tick({inputKeys:this.inputChannels});){for(let{task:o}of await t._matchCachedWrites())t._outputWrites(o.id,o.writes,!0);n&&Bp(t.checkpointMetadata.step,t.channels,this.streamChannelsList),n&&Tn(t.step,Object.values(t.tasks)),await r.tick({timeout:this.stepTimeout,retryPolicy:this.retryPolicy,onStepWrite:(o,a)=>{n&&Hp(o,a,this.streamChannelsList)},maxConcurrency:s.maxConcurrency,signal:s.signal})}if(t.status==="draining")throw t.control==null?new Error("Draining status requires run control"):new Hn(t.control.drainReason??"shutdown");if(t.status==="out_of_steps")throw new Ci([`Recursion limit of ${s.recursionLimit} reached`,"without hitting a stop condition. You can increase the",'limit by setting the "recursionLimit" config key.'].join(" "),{lc_error_code:"GRAPH_RECURSION_LIMIT"})}catch(o){if(i=o,!await t.finishAndHandleError(i))throw o}finally{i===void 0&&await t.finishAndHandleError()}}async clearCache(){await this.cache?.clear([])}};function ug(e){let t=e.metadata??{},r=e.configurable??{},n=r.assistant_id??t.assistant_id,s=r.graph_id??t.graph_id,i=r.langgraph_auth_user,o;if(i!=null&&typeof i=="object"&&"identity"in i&&(o=i),n!=null||s!=null||o!=null)return{assistantId:n!=null?String(n):"",graphId:s!=null?String(s):"",user:o}}var pg=new Set(["key","token","secret","password","auth"]);function hg(e,t){let r=e.toLowerCase(),n=!1;for(let s of pg)if(r.includes(s)){n=!0;break}return e.startsWith("__")||!(typeof t=="string"||typeof t=="number"||typeof t=="boolean")||n}function dg(e){let t=e.configurable;if(!t)return;let r=e.context,n={};for(let[s,i]of Object.entries(t)){if(r!=null&&Object.prototype.hasOwnProperty.call(r,s)&&Object.is(r[s],i)){s.startsWith("__")||(n[s]=void 0);continue}hg(s,i)||(n[s]=i)}return Object.keys(n).length>0?n:void 0}var Ue=class ph extends Q{lc_graph_name="EphemeralValue";guard;value=[];constructor(t=!0){super(),this.guard=t}fromCheckpoint(t){let r=new ph(this.guard);return typeof t<"u"&&(r.value=[t]),r}update(t){if(t.length===0){let r=this.value.length>0;return this.value=[],r}if(t.length!==1&&this.guard)throw new R("EphemeralValue can only receive one value per step.");return this.value=[t[t.length-1]],!0}get(){if(this.value.length===0)throw new F;return this.value[0]}checkpoint(){if(this.value.length===0)throw new F;return this.value[0]}isAvailable(){return this.value.length!==0}};var pa=class{path;ends;constructor(e){K.isRunnable(e.path)?this.path=e.path:this.path=ze(e.path),this.ends=Array.isArray(e.pathMap)?e.pathMap.reduce((t,r)=>(t[r]=r,t),{}):e.pathMap}run(e,t){return Y.registerWriter(new oe({name:"<branch_run>",trace:!1,func:async(r,n)=>{try{return await this._route(r,n,e,t)}catch(s){throw s.name===At.unminifiable_name&&console.warn(`[WARN]: 'NodeInterrupt' thrown in conditional edge. This is likely a bug in your graph implementation.
|
|
131
131
|
NodeInterrupt should only be thrown inside a node, not in edge conditions.`),s}}}))}async _route(e,t,r,n){let s=await this.path.invoke(n?n(t):e,t);Array.isArray(s)||(s=[s]);let i;if(this.ends?i=s.map(o=>re(o)?o:this.ends[o]):i=s,i.some(o=>!o))throw new Error("Branch condition returned unknown or null destination");if(i.filter(re).some(o=>o.node==="__end__"))throw new R("Cannot send a packet to the END node");return await r(i,t)??e}},ha=class{nodes;edges;branches;entryPoint;compiled=!1;constructor(){this.nodes={},this.edges=new Set,this.branches={}}warnIfCompiled(e){this.compiled&&console.warn(e)}get allEdges(){return this.edges}addNode(...e){function t(n){return n.length>=1&&typeof n[0]!="string"}let r=t(e)?Array.isArray(e[0])?e[0]:Object.entries(e[0]):[[e[0],e[1],e[2]]];if(r.length===0)throw new Error("No nodes provided in `addNode`");for(let[n,s,i]of r){for(let a of["|",":"])if(n.includes(a))throw new Error(`"${a}" is a reserved character and is not allowed in node names.`);if(this.warnIfCompiled("Adding a node to a graph that has already been compiled. This will not be reflected in the compiled graph."),n in this.nodes)throw new Error(`Node \`${n}\` already present.`);if(n==="__end__")throw new Error(`Node \`${n}\` is reserved.`);let o=ze(s);this.nodes[n]={runnable:o,metadata:i?.metadata,subgraphs:kn(o)?[o]:i?.subgraphs,ends:i?.ends}}return this}addEdge(e,t){if(this.warnIfCompiled("Adding an edge to a graph that has already been compiled. This will not be reflected in the compiled graph."),e==="__end__")throw new Error("END cannot be a start node");if(t==="__start__")throw new Error("START cannot be an end node");if(Array.from(this.edges).some(([r])=>r===e)&&!("channels"in this))throw new Error(`Already found path for ${e}. For multiple edges, use StateGraph.`);return this.edges.add([e,t]),this}addConditionalEdges(e,t,r){let n=typeof e=="object"?e:{source:e,path:t,pathMap:r};this.warnIfCompiled("Adding an edge to a graph that has already been compiled. This will not be reflected in the compiled graph."),K.isRunnable(n.path)||(n.path=ze(n.path));let s=n.path.getName()==="RunnableLambda"?"condition":n.path.getName();if(this.branches[n.source]&&this.branches[n.source][s])throw new Error(`Condition \`${s}\` already present for node \`${e}\``);return this.branches[n.source]??={},this.branches[n.source][s]=new pa(n),this}setEntryPoint(e){return this.warnIfCompiled("Setting the entry point of a graph that has already been compiled. This will not be reflected in the compiled graph."),this.addEdge(U,e)}setFinishPoint(e){return this.warnIfCompiled("Setting a finish point of a graph that has already been compiled. This will not be reflected in the compiled graph."),this.addEdge(e,L)}compile({checkpointer:e,interruptBefore:t,interruptAfter:r,name:n,transformers:s}={}){this.validate([...Array.isArray(t)?t:[],...Array.isArray(r)?r:[]]);let i=new da({builder:this,checkpointer:e,interruptAfter:r,interruptBefore:t,autoValidate:!1,nodes:{},channels:{[U]:new Ue,[L]:new Ue},inputChannels:U,outputChannels:L,streamChannels:[],streamMode:"values",name:n,streamTransformers:s});for(let[o,a]of Object.entries(this.nodes))i.attachNode(o,a);for(let[o,a]of this.edges)i.attachEdge(o,a);for(let[o,a]of Object.entries(this.branches))for(let[c,l]of Object.entries(a))i.attachBranch(o,c,l);return i.validate()}validate(e){let t=new Set([...this.allEdges].map(([n,s])=>n));for(let[n]of Object.entries(this.branches))t.add(n);for(let n of t)if(n!=="__start__"&&!(n in this.nodes))throw new Error(`Found edge starting at unknown node \`${n}\``);let r=new Set([...this.allEdges].map(([n,s])=>s));for(let[n,s]of Object.entries(this.branches))for(let i of Object.values(s))if(i.ends!=null)for(let o of Object.values(i.ends))r.add(o);else{r.add(L);for(let o of Object.keys(this.nodes))o!==n&&r.add(o)}for(let n of Object.values(this.nodes))for(let s of n.ends??[])r.add(s);if(Object.values(this.nodes).some(n=>n.isErrorHandler))for(let n of Object.keys(this.nodes))r.add(n);for(let n of Object.keys(this.nodes))if(!this.nodes[n].isErrorHandler&&!r.has(n))throw new Ii([`Node \`${n}\` is not reachable.`,"","If you are returning Command objects from your node,",'make sure you are passing names of potential destination nodes as an "ends" array','into ".addNode(..., { ends: ["node1", "node2"] })".'].join(`
|
|
132
|
-
`),{lc_error_code:"UNREACHABLE_NODE"});for(let n of r)if(n!=="__end__"&&!(n in this.nodes))throw new Error(`Found edge ending at unknown node \`${n}\``);if(e){for(let n of e)if(!(n in this.nodes))throw new Error(`Interrupt node \`${n}\` is not present`)}this.compiled=!0}},da=class extends Js{builder;constructor({builder:e,...t}){super(t),this.builder=e}withConfig(e){return super.withConfig(e)}attachNode(e,t){this.channels[e]=new Ue,this.nodes[e]=new Fe({channels:[],triggers:[],metadata:t.metadata,subgraphs:t.subgraphs,ends:t.ends}).pipe(t.runnable).pipe(new Y([{channel:e,value:be}],[X])),this.streamChannels.push(e)}attachEdge(e,t){if(t==="__end__"){if(e==="__start__")throw new Error("Cannot have an edge from START to END");this.nodes[e].writers.push(new Y([{channel:L,value:be}],[X]))}else this.nodes[t].triggers.push(e),this.nodes[t].channels.push(e)}attachBranch(e,t,r){e==="__start__"&&!this.nodes.__start__&&(this.nodes[U]=uh.subscribeTo(U,{tags:[X]})),this.nodes[e].pipe(r.run(s=>new Y(s.map(i=>re(i)?i:{channel:i==="__end__"?L:`branch:${e}:${t}:${i}`,value:be}),[X])));let n=r.ends?Object.values(r.ends):Object.keys(this.nodes);for(let s of n)if(s!=="__end__"){let i=`branch:${e}:${t}:${s}`;this.channels[i]=new Ue,this.nodes[s].triggers.push(i),this.nodes[s].channels.push(i)}}async getGraphAsync(e){let t=e?.xray,r=new gi,n={[U]:r.addNode({schema:We.any()},U)},s={},i={};t&&(i=Object.fromEntries((await Le(this.getSubgraphsAsync())).filter(l=>hh(l[1]))));let o=[];function a(l,u,p,h=!1){if(u==="__end__"&&s.__end__===void 0&&(s[L]=r.addNode({schema:We.any()},L)),n[l]!==void 0){if(s[u]===void 0)throw new Error(`End node ${u} not found!`);return o.push({src:l,dest:u,conditional:h}),r.addEdge(n[l],s[u],p!==u?p:void 0,h)}}for(let[l,u]of Object.entries(this.builder.nodes)){let p=se(l),h=u.runnable,d=u.metadata??{};if(this.interruptBefore?.includes(l)&&this.interruptAfter?.includes(l)?d.__interrupt="before,after":this.interruptBefore?.includes(l)?d.__interrupt="before":this.interruptAfter?.includes(l)&&(d.__interrupt="after"),t){let m=typeof t=="number"?t-1:t,f=i[l]!==void 0?await i[l].getGraphAsync({...e,xray:m}):h.getGraph(e);if(f.trimFirstNode(),f.trimLastNode(),Object.keys(f.nodes).length>1){let _=function(C){return C?C.lc_runnable:!1},S=function(C,I){if(C!==void 0&&!ai(C))return C;if(_(I))try{let M=I.getName();return M=M.startsWith("Runnable")?M.slice(8):M,M}catch{return I.getName()}else return I.name??"UnknownSchema"},[g,y]=r.extend(f,p);if(g===void 0)throw new Error(`Could not extend subgraph "${l}" due to missing entrypoint.`);y!==void 0&&(n[p]={name:S(y.id,y.data),...y}),s[p]={name:S(g.id,g.data),...g}}else{let g=r.addNode(h,p,d);n[p]=g,s[p]=g}}else{let m=r.addNode(h,p,d);n[p]=m,s[p]=m}}let c=[...this.builder.allEdges].sort(([l],[u])=>l<u?-1:u>l?1:0);for(let[l,u]of c)a(se(l),se(u));for(let[l,u]of Object.entries(this.builder.branches)){let p={...Object.fromEntries(Object.keys(this.builder.nodes).filter(h=>h!==l).map(h=>[se(h),se(h)])),[L]:L};for(let h of Object.values(u)){let d;h.ends!==void 0?d=h.ends:d=p;for(let[m,f]of Object.entries(d))a(se(l),se(f),m,!0)}}for(let[l,u]of Object.entries(this.builder.nodes))if(u.ends!==void 0)for(let p of u.ends)a(se(l),se(p),void 0,!0);return dh(this.builder.nodes,o,a),r}getGraph(e){let t=e?.xray,r=new gi,n={[U]:r.addNode({schema:We.any()},U)},s={},i={};t&&(i=Object.fromEntries(Pt(this.getSubgraphs()).filter(l=>hh(l[1]))));let o=[];function a(l,u,p,h=!1){if(u==="__end__"&&s.__end__===void 0&&(s[L]=r.addNode({schema:We.any()},L)),n[l]!==void 0){if(s[u]===void 0)throw new Error(`End node ${u} not found!`);return o.push({src:l,dest:u,conditional:h}),r.addEdge(n[l],s[u],p!==u?p:void 0,h)}}for(let[l,u]of Object.entries(this.builder.nodes)){let p=se(l),h=u.runnable,d=u.metadata??{};if(this.interruptBefore?.includes(l)&&this.interruptAfter?.includes(l)?d.__interrupt="before,after":this.interruptBefore?.includes(l)?d.__interrupt="before":this.interruptAfter?.includes(l)&&(d.__interrupt="after"),t){let m=typeof t=="number"?t-1:t,f=i[l]!==void 0?i[l].getGraph({...e,xray:m}):h.getGraph(e);if(f.trimFirstNode(),f.trimLastNode(),Object.keys(f.nodes).length>1){let _=function(C){return C?C.lc_runnable:!1},S=function(C,I){if(C!==void 0&&!ai(C))return C;if(_(I))try{let M=I.getName();return M=M.startsWith("Runnable")?M.slice(8):M,M}catch{return I.getName()}else return I.name??"UnknownSchema"},[g,y]=r.extend(f,p);if(g===void 0)throw new Error(`Could not extend subgraph "${l}" due to missing entrypoint.`);y!==void 0&&(n[p]={name:S(y.id,y.data),...y}),s[p]={name:S(g.id,g.data),...g}}else{let g=r.addNode(h,p,d);n[p]=g,s[p]=g}}else{let m=r.addNode(h,p,d);n[p]=m,s[p]=m}}let c=[...this.builder.allEdges].sort(([l],[u])=>l<u?-1:u>l?1:0);for(let[l,u]of c)a(se(l),se(u));for(let[l,u]of Object.entries(this.builder.branches)){let p={...Object.fromEntries(Object.keys(this.builder.nodes).filter(h=>h!==l).map(h=>[se(h),se(h)])),[L]:L};for(let h of Object.values(u)){let d;h.ends!==void 0?d=h.ends:d=p;for(let[m,f]of Object.entries(d))a(se(l),se(f),m,!0)}}for(let[l,u]of Object.entries(this.builder.nodes))if(u.ends!==void 0)for(let p of u.ends)a(se(l),se(p),void 0,!0);return dh(this.builder.nodes,o,a),r}};function hh(e){return typeof e.attachNode=="function"&&typeof e.attachEdge=="function"}function se(e){return e==="subgraph"?`"${e}"`:e}function dh(e,t,r){let n=new Set(t.map(i=>i.src)),s=[...new Set(t.filter(i=>!i.conditional&&i.dest!=="__end__").map(i=>i.dest))].sort();for(let i of s){if(n.has(i))continue;let o=Object.keys(e).find(a=>se(a)===i);o!==void 0&&e[o]?.isErrorHandler||r(i,L)}}function $t(e){return typeof e=="object"&&e!==null&&"~standard"in e&&typeof e["~standard"]=="object"&&e["~standard"]!==null&&"validate"in e["~standard"]}function mh(e){return typeof e=="object"&&e!==null&&"~standard"in e&&typeof e["~standard"]=="object"&&e["~standard"]!==null&&"jsonSchema"in e["~standard"]}function jt(e){if(mh(e))try{return e["~standard"].jsonSchema.input({target:"draft-07"})}catch{return}}function wt(e){if(e!=null&&$t(e))try{let t=e["~standard"].validate(void 0);if(t&&typeof t=="object"&&!("then"in t&&typeof t.then=="function")){let r=t;if(!r.issues){let n=r.value;return()=>n}}}catch{}}var mg=e=>e!=null&&e.lc_graph_name==="DeltaChannel",Ys=class fh extends Q{lc_graph_name="DeltaChannel";value;reducer;snapshotFrequency;initialValueFactory;constructor(t,r){super();let n=r?.snapshotFrequency??1e3;if(!Number.isInteger(n)||n<=0)throw new Error(`snapshotFrequency must be a positive integer, got ${n}`);this.reducer=t,this.snapshotFrequency=n,this.initialValueFactory=r?.initialValueFactory??(()=>[]),this.value=void 0}fromCheckpoint(t){let r=new fh(this.reducer,{snapshotFrequency:this.snapshotFrequency,initialValueFactory:this.initialValueFactory});return t===void 0?r.value=this.initialValueFactory():Pi(t)?r.value=t.value:r.value=t,r}replayWrites(t){let r=t.map(o=>o[2]);if(r.length===0)return;let n=this.value,s=0;for(let o=0;o<r.length;o+=1){let[a,c]=Oe(r[o]);a&&(n=c??this.initialValueFactory(),s=o+1)}let i=r.slice(s);this.value=i.length>0?this.reducer(n,i):n}update(t){if(t.length===0)return!1;let r,n=!1;for(let i of t)if(Kt(i)){if(n)throw new R("Can receive only one Overwrite value per step.");n=!0,[,r]=Oe(i)}if(n)return this.value=r??this.initialValueFactory(),!0;let s=this.value===void 0?this.initialValueFactory():this.value;return this.value=this.reducer(s,t),!0}get(){if(this.value===void 0)throw new F;return this.value}checkpoint(){}isAvailable(){return this.value!==void 0}equals(t){return this===t?!0:!mg(t)||this.snapshotFrequency!==t.snapshotFrequency?!1:this.reducer===t.reducer}};var ma=Symbol.for("langgraph.channel.missing"),Xs=class gh extends Q{lc_graph_name="UntrackedValue";guard;_value=ma;initialValueFactory;constructor(t){super(),this.guard=t?.guard??!0,this.initialValueFactory=t?.initialValueFactory,this.initialValueFactory&&(this._value=this.initialValueFactory())}fromCheckpoint(t){return new gh({guard:this.guard,initialValueFactory:this.initialValueFactory})}update(t){if(t.length===0)return!1;if(t.length!==1&&this.guard)throw new R("UntrackedValue(guard=true) can receive only one value per step. Use guard=false if you want to store any one of multiple values.",{lc_error_code:"INVALID_CONCURRENT_GRAPH_UPDATE"});return this._value=t[t.length-1],!0}get(){if(this._value===ma)throw new F;return this._value}checkpoint(){}isAvailable(){return this._value!==ma}};var Lt=(e,t)=>e.size===t.size&&[...e].every(r=>t.has(r)),fa=class yh extends Q{lc_graph_name="NamedBarrierValue";names;seen;constructor(t){super(),this.names=t,this.seen=new Set}fromCheckpoint(t){let r=new yh(this.names);return typeof t<"u"&&(r.seen=new Set(t)),r}update(t){let r=!1;for(let n of t)if(this.names.has(n))this.seen.has(n)||(this.seen.add(n),r=!0);else throw new R(`Value ${JSON.stringify(n)} not in names ${JSON.stringify(this.names)}`);return r}get(){if(!Lt(this.names,this.seen))throw new F}checkpoint(){return[...this.seen]}consume(){return this.seen&&this.names&&Lt(this.seen,this.names)?(this.seen=new Set,!0):!1}isAvailable(){return!!this.names&&Lt(this.names,this.seen)}},ga=class _h extends Q{lc_graph_name="NamedBarrierValueAfterFinish";names;seen;finished;constructor(t){super(),this.names=t,this.seen=new Set,this.finished=!1}fromCheckpoint(t){let r=new _h(this.names);if(typeof t<"u"){let[n,s]=t;r.seen=new Set(n),r.finished=s}return r}update(t){let r=!1;for(let n of t)if(this.names.has(n)&&!this.seen.has(n))this.seen.add(n),r=!0;else if(!this.names.has(n))throw new R(`Value ${JSON.stringify(n)} not in names ${JSON.stringify(this.names)}`);return r}get(){if(!this.finished||!Lt(this.names,this.seen))throw new F}checkpoint(){return[[...this.seen],this.finished]}consume(){return this.finished&&this.seen&&this.names&&Lt(this.seen,this.names)?(this.seen=new Set,this.finished=!1,!0):!1}finish(){return!this.finished&&this.names&&Lt(this.names,this.seen)?(this.finished=!0,!0):!1}isAvailable(){return this.finished&&!!this.names&&Lt(this.names,this.seen)}};var ya=Symbol.for("langgraph.state.reduced_value"),bt=class{[ya]=!0;valueSchema;inputSchema;reducer;jsonSchemaExtra;constructor(e,t){this.reducer=t.reducer,this.jsonSchemaExtra=t.jsonSchemaExtra,this.valueSchema=e,this.inputSchema="inputSchema"in t?t.inputSchema:e,this.jsonSchemaExtra=t.jsonSchemaExtra}static isInstance(e){return typeof e=="object"&&e!==null&&ya in e&&e[ya]===!0}};var wh=Symbol.for("langgraph.state.untracked_value"),sr=class{[wh]=!0;schema;guard;constructor(e,t){this.schema=e,this.guard=t?.guard??!0}static isInstance(e){return typeof e=="object"&&e!==null&&wh in e}};var _a=Symbol.for("langgraph.state.delta_value"),vt=class{[_a]=!0;valueSchema;inputSchema;reducer;snapshotFrequency;jsonSchemaExtra;constructor(e,t){this.reducer=t.reducer,this.valueSchema=e,this.inputSchema="inputSchema"in t?t.inputSchema:e,this.snapshotFrequency=t.snapshotFrequency,this.jsonSchemaExtra=t.jsonSchemaExtra}static isInstance(e){return typeof e=="object"&&e!==null&&_a in e&&e[_a]===!0}};var wa=Symbol.for("langgraph.state.state_schema"),Ge=class{[wa]=!0;constructor(e){this.fields=e}getChannels(){let e={};for(let[t,r]of Object.entries(this.fields))if(vt.isInstance(r)){let n=wt(r.valueSchema);e[t]=new Ys(r.reducer,{snapshotFrequency:r.snapshotFrequency,initialValueFactory:n})}else if(bt.isInstance(r)){let n=wt(r.valueSchema);e[t]=new gt(r.reducer,n)}else if(sr.isInstance(r)){let n=r.schema?wt(r.schema):void 0;e[t]=new Xs({guard:r.guard,initialValueFactory:n})}else if($t(r))e[t]=new je(wt(r));else throw new Error(`Invalid state field "${t}": must be a schema, ReducedValue, DeltaValue, UntrackedValue, or ManagedValue`);return e}getJsonSchema(){let e={},t=[];for(let[r,n]of Object.entries(this.fields)){let s;if(vt.isInstance(n)||bt.isInstance(n)?(s=jt(n.valueSchema),n.jsonSchemaExtra&&(s={...s??{},...n.jsonSchemaExtra})):sr.isInstance(n)?s=n.schema?jt(n.schema):void 0:$t(n)&&(s=jt(n)),s){e[r]=s;let i=!1;vt.isInstance(n)||bt.isInstance(n)?i=wt(n.valueSchema)!==void 0:sr.isInstance(n)?i=n.schema?wt(n.schema)!==void 0:!1:i=wt(n)!==void 0,i||t.push(r)}}return{type:"object",properties:e,required:t.length>0?t:void 0}}getInputJsonSchema(){let e={};for(let[t,r]of Object.entries(this.fields)){let n;vt.isInstance(r)||bt.isInstance(r)?(n=jt(r.inputSchema),r.jsonSchemaExtra&&(n={...n??{},...r.jsonSchemaExtra})):sr.isInstance(r)?n=r.schema?jt(r.schema):void 0:$t(r)&&(n=jt(r)),n&&(e[t]=n)}return{type:"object",properties:e}}getChannelKeys(){return Object.entries(this.fields).map(([e])=>e)}getAllKeys(){return Object.keys(this.fields)}async validateInput(e){if(e==null||typeof e!="object")return e;let t={};for(let[r,n]of Object.entries(e)){let s=this.fields[r];if(s===void 0){t[r]=n;continue}let i;if(vt.isInstance(s)||bt.isInstance(s)){let[o,a]=Oe(n);if(o){i=s.valueSchema;let c=await i["~standard"].validate(a);if(c.issues)throw new Error(`Validation failed for field "${r}": ${JSON.stringify(c.issues)}`);t[r]={[Ke]:c.value};continue}i=s.inputSchema}else sr.isInstance(s)?i=s.schema:$t(s)&&(i=s);if(i){let o=await i["~standard"].validate(n);if(o.issues)throw new Error(`Validation failed for field "${r}": ${JSON.stringify(o.issues)}`);t[r]=o.value}else t[r]=n}return t}static isInstance(e){return typeof e=="object"&&e!==null&&wa in e&&e[wa]===!0}};function ir(e,t){let r=Array.isArray(e)?e:[e],n=Array.isArray(t)?t:[t],s=r.map(qe),i=n.map(qe);for(let u of s)(u.id===null||u.id===void 0)&&(u.id=Gr(),u.lc_kwargs.id=u.id);let o;for(let u=0;u<i.length;u+=1){let p=i[u];(p.id===null||p.id===void 0)&&(p.id=Gr(),p.lc_kwargs.id=p.id),pr.isInstance(p)&&p.id==="__remove_all__"&&(o=u)}if(o!=null)return i.slice(o+1);let a=[...s],c=new Map(a.map((u,p)=>[u.id,p])),l=new Set;for(let u of i){let p=c.get(u.id);if(p!==void 0)pr.isInstance(u)?l.add(u.id):(l.delete(u.id),a[p]=u);else{if(pr.isInstance(u))throw new Error(`Attempting to delete a message with an ID that doesn't exist ('${u.id}')`);c.set(u.id,a.length),a.push(u)}}return a.filter(u=>!l.has(u.id))}function ba(e,t){let r=[];for(let a of t)Array.isArray(a)?r.push(...a):r.push(a);let n=e.length>0&&ee.isInstance(e[0])?e:e.map(qe),s=r.map(qe),i=new Map;for(let a=0;a<n.length;a+=1){let c=n[a].id;c!=null&&i.set(c,a)}let o=[...n];for(let a of s){let c=a.id;pr.isInstance(a)&&c==="__remove_all__"?(o.length=0,i.clear()):c==null?o.push(a):pr.isInstance(a)?i.has(c)&&(o[i.get(c)]=null,i.delete(c)):i.has(c)?o[i.get(c)]=a:(i.set(c,o.length),o.push(a))}return o.filter(a=>a!==null)}var bh=We.custom().default(()=>[]),vh=We.custom(),fg=new bt(bh,{inputSchema:vh,reducer:ir,jsonSchemaExtra:{langgraph_type:"messages",description:"A list of chat messages"}}),gg=new vt(bh,{inputSchema:vh,reducer:ba,jsonSchemaExtra:{langgraph_type:"messages",description:"A list of chat messages"}});var yg=class{_map=new Map;_extensionCache=new Map;get(e){return this._map.get(e)}extend(e,t){let r=this.get(e);this._map.set(e,t(r))}remove(e){return this._map.delete(e),this}has(e){return this._map.has(e)}getChannelsForSchema(e){let t={},r=qr(e);for(let[n,s]of Object.entries(r)){let i=this.get(s);i?.reducer?t[n]=new gt(i.reducer.fn,i.default):t[n]=new je(i?.default)}return t}getExtendedChannelSchemas(e,t){if(Object.keys(t).length===0)return e;let r=Object.entries(t).filter(([,i])=>i===!0).sort(([i],[o])=>i.localeCompare(o)).map(([i,o])=>`${i}:${o}`).join("|"),n=this._extensionCache.get(r)??new Map;if(n.has(e))return n.get(e);let s=e;if(t.withReducerSchema||t.withJsonSchemaExtrasAsDescription){let i=Object.entries(qr(e)).map(([o,a])=>{let c=this.get(a),l=t.withReducerSchema?c?.reducer?.schema??a:a;if(t.withJsonSchemaExtrasAsDescription&&c?.jsonSchemaExtra){let u=mi(l)??mi(a),p=JSON.stringify({...c.jsonSchemaExtra,description:u});l=l.describe(`lg:${p}`)}return[o,l]});s=yc(e,Object.fromEntries(i)),gc(s)&&(s._def.unknownKeys="strip")}return t.asPartial&&(s=fr(s)),n.set(e,s),this._extensionCache.set(r,n),s}},An=new yg;function Sh(e,t){if(t.reducer&&!t.default){let r=_c(e);r!=null&&(t.default=r)}if(t.reducer){let r=Object.assign(e,{lg_reducer_schema:t.reducer?.schema??e});return An.extend(r,()=>t),r}else return An.extend(e,()=>t),e}function or(e){return e==null?!1:!!(Ge.isInstance(e)||ge(e)||typeof e=="object"&&"lc_graph_name"in e&&e.lc_graph_name==="AnnotationRoot"||typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length>0&&Object.values(e).every(t=>typeof t=="function"||Oo(t)))}function Ch(e){if(typeof e!="object"||e==null)return!1;let t=e,r="state"in t&&or(t.state),n="stateSchema"in t&&or(t.stateSchema),s="input"in t&&or(t.input);return!(!r&&!n&&!s||"input"in t&&t.input!=null&&!or(t.input)||"output"in t&&t.output!=null&&!or(t.output))}var St="__root__",jr="__default_error_handler__",Qs=Symbol.for("langgraph.state.partial"),Ft=class extends ha{channels={};waitingEdges=new Set;_schemaDefinition;_schemaRuntimeDefinition;_inputDefinition;_inputRuntimeDefinition;_outputDefinition;_outputRuntimeDefinition;_schemaDefinitions=new Map;_metaRegistry=An;_configSchema;_configRuntimeSchema;_interrupt;_writer;_nodeDefaults={};constructor(e,t){super();let r=this._normalizeToStateGraphInit(e,t),n=r.state??r.stateSchema??r.input;if(!n)throw new Xr;let s=this._getChannelsFromSchema(n);this._schemaDefinition=s,Ge.isInstance(n)?this._schemaRuntimeDefinition=n:ge(n)&&(this._schemaRuntimeDefinition=n),r.input?Ge.isInstance(r.input)?this._inputRuntimeDefinition=r.input:ge(r.input)?this._inputRuntimeDefinition=r.input:this._inputRuntimeDefinition=Qs:this._inputRuntimeDefinition=Qs,r.output?Ge.isInstance(r.output)?this._outputRuntimeDefinition=r.output:ge(r.output)?this._outputRuntimeDefinition=r.output:this._outputRuntimeDefinition=this._schemaRuntimeDefinition:this._outputRuntimeDefinition=this._schemaRuntimeDefinition;let i=r.input?this._getChannelsFromSchema(r.input):s,o=r.output?this._getChannelsFromSchema(r.output):s;this._inputDefinition=i,this._outputDefinition=o,this._addSchema(this._schemaDefinition),this._addSchema(this._inputDefinition),this._addSchema(this._outputDefinition),r.context&&ge(r.context)&&(this._configRuntimeSchema=r.context),this._interrupt=r.interrupt,this._writer=r.writer}setNodeDefaults(e){return e.retryPolicy!==void 0&&(this._nodeDefaults.retryPolicy=e.retryPolicy),e.cachePolicy!==void 0&&(this._nodeDefaults.cachePolicy=typeof e.cachePolicy=="boolean"?e.cachePolicy?{}:void 0:e.cachePolicy),e.timeout!==void 0&&(this._nodeDefaults.timeout=Bt(e.timeout)),e.errorHandler!==void 0&&(this._nodeDefaults.errorHandler=e.errorHandler),this}_createDefaultErrorHandlerSpec(){let e=this._nodeDefaults.errorHandler;if(e!==void 0)return{runnable:new oe({func:(t,r)=>{let n=r?.configurable?.[Jr];return e(t,n,r)},name:jr,trace:!1}),metadata:void 0,input:this._schemaDefinition,retryPolicy:void 0,cachePolicy:void 0,isErrorHandler:!0}}_normalizeToStateGraphInit(e,t){if(Ch(e)){if(ge(t)||Cs.isInstance(t))return{...e,context:t};let r=t;return{...e,input:e.input??r?.input,output:e.output??r?.output,context:e.context??r?.context,interrupt:e.interrupt??r?.interrupt,writer:e.writer??r?.writer,nodes:e.nodes??r?.nodes}}if(or(e)){if(ge(t)||Cs.isInstance(t))return{state:e,context:t};let r=t;return{state:e,input:r?.input,output:r?.output,context:r?.context,interrupt:r?.interrupt,writer:r?.writer,nodes:r?.nodes}}if(wg(e))return{state:_g(e.channels)};throw new Xr}_getChannelsFromSchema(e){if(Ge.isInstance(e))return e.getChannels();if(ge(e))return this._metaRegistry.getChannelsForSchema(e);if(typeof e=="object"&&"lc_graph_name"in e&&e.lc_graph_name==="AnnotationRoot")return e.spec;if(typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length>0)return e;throw new Xr("Invalid schema type. Expected StateSchema, Zod object, AnnotationRoot, or StateDefinition.")}get allEdges(){return new Set([...this.edges,...Array.from(this.waitingEdges).flatMap(([e,t])=>e.map(r=>[r,t]))])}_addSchema(e){if(!this._schemaDefinitions.has(e)){this._schemaDefinitions.set(e,e);for(let[t,r]of Object.entries(e)){let n;if(typeof r=="function"?n=r():n=r,this.channels[t]!==void 0){if(!this.channels[t].equals(n)&&n.lc_graph_name!=="LastValue")throw new Error(`Channel "${t}" already exists with a different type.`)}else this.channels[t]=n}}}addNode(...e){function t(n){return n.length>=1&&typeof n[0]!="string"}let r=t(e)?Array.isArray(e[0])?e[0]:Object.entries(e[0]).map(([n,s])=>[n,s]):[[e[0],e[1],e[2]]];if(r.length===0)throw new Error("No nodes provided in `addNode`");for(let[n,s,i]of r){if(n in this.channels)throw new Error(`${n} is already being used as a state attribute (a.k.a. a channel), cannot also be used as a node name.`);for(let h of["|",":"])if(n.includes(h))throw new Error(`"${h}" is a reserved character and is not allowed in node names.`);if(this.warnIfCompiled("Adding a node to a graph that has already been compiled. This will not be reflected in the compiled graph."),n in this.nodes)throw new Error(`Node \`${n}\` already present.`);if(n==="__end__"||n==="__start__")throw new Error(`Node \`${n}\` is reserved.`);let o=this._schemaDefinition;i?.input!==void 0&&(o=this._getChannelsFromSchema(i.input)),this._addSchema(o);let a;K.isRunnable(s)?a=s:typeof s=="function"?a=new oe({func:s,name:n,trace:!1}):a=ze(s);let c=i?.cachePolicy,l;c!==void 0&&(l=typeof c=="boolean"?c?{}:!1:c);let u;if(i?.errorHandler!==void 0){if(u=`__error_handler__${n}`,u in this.nodes)throw new Error(`Cannot add error handler to node \`${n}\`: the reserved name \`${u}\` is already in use. StateGraph registers \`__error_handler__<nodeName>\` when you pass \`errorHandler\` in addNode options. Remove or rename the existing node with that name (for example, you may have added it manually).`);let h=i.errorHandler,d={runnable:new oe({func:(m,f)=>{let g=f?.configurable?.[Jr];return h(m,g,f)},name:u,trace:!1}),metadata:void 0,input:o??this._schemaDefinition,retryPolicy:void 0,cachePolicy:void 0,isErrorHandler:!0};this.nodes[u]=d}let p={runnable:a,retryPolicy:i?.retryPolicy,cachePolicy:l,timeout:Bt(i?.timeout),metadata:i?.metadata,input:o??this._schemaDefinition,subgraphs:kn(a)?[a]:i?.subgraphs,ends:i?.ends,defer:i?.defer,errorHandlerNode:u};this.nodes[n]=p}return this}addEdge(e,t){if(typeof e=="string")return super.addEdge(e,t);this.compiled&&console.warn("Adding an edge to a graph that has already been compiled. This will not be reflected in the compiled graph.");for(let r of e){if(r==="__end__")throw new Error("END cannot be a start node");if(!Object.keys(this.nodes).some(n=>n===r))throw new Error(`Need to add a node named "${r}" first`)}if(t==="__end__")throw new Error("END cannot be an end node");if(!Object.keys(this.nodes).some(r=>r===t))throw new Error(`Need to add a node named "${t}" first`);return this.waitingEdges.add([e,t]),this}addSequence(e){let t=Array.isArray(e)?e:Object.entries(e);if(t.length===0)throw new Error("Sequence requires at least one node.");let r;for(let[n,s,i]of t){if(n in this.nodes)throw new Error(`Node names must be unique: node with the name "${n}" already exists.`);let o=n;this.addNode(n,s,i),r!=null&&this.addEdge(r,o),r=o}return this}compile({checkpointer:e,store:t,cache:r,interruptBefore:n,interruptAfter:s,name:i,description:o,transformers:a}={}){let c=this._createDefaultErrorHandlerSpec();if(c!==void 0){if(jr in this.nodes)throw new Error(`Cannot apply a default error handler: the reserved node name \`${jr}\` is already in use. setNodeDefaults({ errorHandler }) registers a node with that name; rename the conflicting node.`);this.nodes[jr]=c}try{return this._compileResolved({checkpointer:e,store:t,cache:r,interruptBefore:n,interruptAfter:s,name:i,description:o,transformers:a,defaultErrorHandlerNode:c!==void 0?jr:void 0})}finally{c!==void 0&&delete this.nodes[jr]}}_compileResolved({checkpointer:e,store:t,cache:r,interruptBefore:n,interruptAfter:s,name:i,description:o,transformers:a,defaultErrorHandlerNode:c}){this.validate([...Array.isArray(n)?n:[],...Array.isArray(s)?s:[]]);let l=Object.keys(this._schemaDefinitions.get(this._outputDefinition)),u=l.length===1&&l[0]===St?St:l,p=Object.keys(this.channels),h=p.length===1&&p[0]===St?St:p,d=this._interrupt,m=new Eh({builder:this,checkpointer:e,interruptAfter:s,interruptBefore:n,autoValidate:!1,nodes:{},channels:{...this.channels,[U]:new Ue},inputChannels:U,outputChannels:u,streamChannels:h,streamMode:"updates",store:t,cache:r,name:i,description:o,userInterrupt:d,streamTransformers:a});m.attachNode(U);let f=this._nodeDefaults,g=f.retryPolicy!==void 0||f.cachePolicy!==void 0||f.timeout!==void 0||c!==void 0;for(let[y,_]of Object.entries(this.nodes)){let S=_.isErrorHandler===!0,C=g?{..._,retryPolicy:_.retryPolicy??f.retryPolicy,cachePolicy:S||_.cachePolicy===!1?void 0:_.cachePolicy??f.cachePolicy,timeout:_.timeout??f.timeout,errorHandlerNode:!S&&c!==void 0&&_.errorHandlerNode===void 0?c:_.errorHandlerNode}:_;m.attachNode(y,C)}m.attachBranch(U,Si,kh(),{withReader:!1});for(let[y]of Object.entries(this.nodes))m.attachBranch(y,Si,kh(),{withReader:!1});for(let[y,_]of this.edges)m.attachEdge(y,_);for(let[y,_]of this.waitingEdges)m.attachEdge(y,_);for(let[y,_]of Object.entries(this.branches))for(let[S,C]of Object.entries(_))m.attachBranch(y,S,C);return m.validate()}};function _g(e){let t={};for(let[r,n]of Object.entries(e))r===St?t[r]=ks(n):t[r]=ks(n);return t}var Eh=class extends da{description;_metaRegistry=An;constructor({description:e,...t}){super(t),this.description=e}attachNode(e,t){let r;e==="__start__"?r=Object.entries(this.builder._schemaDefinitions.get(this.builder._inputDefinition)).map(([c])=>c):r=Object.keys(this.builder.channels);function n(c){if(ie(c))return c.graph===ye.PARENT?null:c._updateAsTuples();if(Array.isArray(c)&&c.length>0&&c.some(l=>ie(l))){let l=[];for(let u of c)if(ie(u)){if(u.graph===ye.PARENT)continue;l.push(...u._updateAsTuples())}else l.push([St,u]);return l}else if(c!=null)return[[St,c]];return null}let s=e,i=async c=>{if(c==null||c.length===0)return c;let l=this.builder._schemaRuntimeDefinition;if(Ge.isInstance(l)){let u=new Set(l.getChannelKeys());return Promise.all(c.map(async([p,h])=>{if(!u.has(p))return[p,h];let d=await l.validateInput({[p]:h});return[p,Object.prototype.hasOwnProperty.call(d,p)?d[p]:h]}))}if(ge(l)){let u=new Set(Object.keys(qr(l)));if(c.filter(([d])=>u.has(d)).length===0)return c;let p=fr(this._metaRegistry.getExtendedChannelSchemas(l,{withReducerSchema:!0})),h=fr(l);return c.map(([d,m])=>{if(!u.has(d))return[d,m];let[f,g]=Oe(m);if(f){let _=mr(h,{[d]:g});return[d,Object.prototype.hasOwnProperty.call(_,d)?{[Ke]:_[d]}:m]}let y=mr(p,{[d]:m});return[d,Object.prototype.hasOwnProperty.call(y,d)?y[d]:m]})}return c};async function o(c){if(c){if(ie(c))return c.graph===ye.PARENT?null:i(c._updateAsTuples().filter(([l])=>r.includes(l)));if(Array.isArray(c)&&c.length>0&&c.some(ie)){let l=[];for(let u of c)if(ie(u)){if(u.graph===ye.PARENT)continue;l.push(...u._updateAsTuples().filter(([p])=>r.includes(p)))}else{let p=await o(u);p&&l.push(...p??[])}return i(l)}else{if(typeof c=="object"&&!Array.isArray(c))return i(Object.entries(c).filter(([l])=>r.includes(l)));{let l=Array.isArray(c)?"array":typeof c;throw new R(`Expected node "${s.toString()}" to return an object or an array containing at least one Command object, received ${l}`,{lc_error_code:"INVALID_GRAPH_NODE_RETURN_VALUE"})}}}else return null}let a=[{value:be,mapper:new oe({func:r.length&&r[0]===St?n:o,trace:!1,recurse:!1})}];if(e==="__start__")this.nodes[e]=new Fe({tags:[X],triggers:[U],channels:[U],writers:[new Y(a,[X])]});else{let c=t?.input??this.builder._schemaDefinition,l=Object.fromEntries(Object.keys(this.builder._schemaDefinitions.get(c)).map(m=>[m,m])),u=Object.keys(l).length===1&&St in l,p=`branch:to:${e}`;this.channels[p]=t?.defer?new Do:new Ue(!1);let h=t?.cachePolicy,d=h===!1?void 0:h;this.nodes[e]=new Fe({triggers:[p],channels:u?Object.keys(l):l,writers:[new Y(a,[X])],mapper:u?void 0:m=>Object.fromEntries(Object.entries(m).filter(([f])=>f in l)),bound:t?.runnable,metadata:t?.metadata,retryPolicy:t?.retryPolicy,cachePolicy:d,timeout:t?.timeout,subgraphs:t?.subgraphs,ends:t?.ends,isErrorHandler:t?.isErrorHandler,errorHandlerNode:t?.errorHandlerNode})}}attachEdge(e,t){if(t!=="__end__"){if(typeof e=="string")this.nodes[e].writers.push(new Y([{channel:`branch:to:${t}`,value:null}],[X]));else if(Array.isArray(e)){let r=`join:${e.join("+")}:${t}`;this.channels[r]=this.builder.nodes[t].defer?new ga(new Set(e)):new fa(new Set(e)),this.nodes[t].triggers.push(r);for(let n of e)this.nodes[n].writers.push(new Y([{channel:r,value:n}],[X]))}}}attachBranch(e,t,r,n={withReader:!0}){let s=async(i,o)=>{let a=i.filter(l=>l!==L);if(!a.length)return;let c=a.map(l=>re(l)?l:{channel:l==="__end__"?l:`branch:to:${l}`,value:e});await Y.doWrite({...o,tags:(o.tags??[]).concat([X])},c)};this.nodes[e].writers.push(r.run(s,n.withReader?i=>Tp.doRead(i,this.streamChannels??this.outputChannels,!0):void 0))}async _validateInput(e){if(e==null)return e;let t=this.builder._inputRuntimeDefinition,r=this.builder._schemaRuntimeDefinition;if(Ge.isInstance(t)){if(ie(e)){let s=e;return e.update&&(s.update=await t.validateInput(Array.isArray(e.update)?Object.fromEntries(e.update):e.update)),s}return await t.validateInput(e)}if(t===Qs&&Ge.isInstance(r)){if(ie(e)){let s=e;return e.update&&(s.update=await r.validateInput(Array.isArray(e.update)?Object.fromEntries(e.update):e.update)),s}return await r.validateInput(e)}let n=(()=>{let s=i=>{if(i!=null)return this._metaRegistry.getExtendedChannelSchemas(i,{withReducerSchema:!0})};if(ge(t))return s(t);if(t===Qs)return ge(r)?fr(s(r)):void 0})();if(ie(e)){let s=e;if(e.update&&n!=null){let i=Array.isArray(e.update)?Object.fromEntries(e.update):e.update,o=mr(n,i);s.update=Object.fromEntries(Object.keys(i).map(a=>[a,o[a]]))}return s}return n!=null?mr(n,e):e}isInterrupted(e){return Jt(e)}async _validateContext(e){let t=this.builder._configRuntimeSchema;return ge(t)&&mr(t,e),e}};function wg(e){return typeof e=="object"&&e!==null&&e.channels!==void 0}function bg(e){if(re(e))return[e];let t=[];ie(e)?t.push(e):Array.isArray(e)&&t.push(...e.filter(ie));let r=[];for(let n of t){if(n.graph===ye.PARENT)throw new zn(n);re(n.goto)||typeof n.goto=="string"?r.push(n.goto):Array.isArray(n.goto)&&r.push(...n.goto)}return r}function kh(){return new pa({path:new oe({func:bg,tags:[X],trace:!1,recurse:!1,name:"<control_branch>"})})}var xh=function(t,r){let{name:n,checkpointer:s,store:i,cache:o}=typeof t=="string"?{name:t,checkpointer:void 0,store:void 0}:t,a=Bt(typeof t=="string"?void 0:t.timeout);if(xp(r)||Ip(r))throw new Error("Generators are disallowed as entrypoints. For streaming responses, use config.write.");let c="updates",l=$p(n,r);function u(m){return typeof m=="object"&&m!==null&&"__lg_type"in m&&m.__lg_type==="__pregel_final"}let p=new oe({name:"pluckReturnValue",func:m=>u(m)?m.value:m}),h=new oe({name:"pluckSaveValue",func:m=>u(m)?m.save:m}),d=new Fe({bound:l,triggers:[U],channels:[U],timeout:a,writers:[new Y([{channel:L,value:be,mapper:p},{channel:Tt,value:be,mapper:h}],[X])]});return new Js({name:n,checkpointer:s,nodes:{[n]:d},channels:{[U]:new Ue,[L]:new je,[Tt]:new je},inputChannels:U,outputChannels:L,streamChannels:L,streamMode:c,store:i,cache:o})};xh.final=function({value:t,save:r}){return{value:t,save:r,__lg_type:"__pregel_final"}};var vg=B.Root({messages:B({reducer:ir,default:()=>[]})}),Ih={reducer:{fn:ir},jsonSchemaExtra:{langgraph_type:"messages"},default:()=>[]},Sg=fi.object({messages:Sh(fi.custom(),Ih)});var Lr=async(e={})=>{let{modelTier:t="default",config:r}=e,{getChatAIUtilityServiceUrl:n}=await import("./I6NVKNZJ.js").then(m=>m.default),{createAuthenticatedFetch:s}=await import("./AZOJHVAO.js").then(m=>m.default.then(e=>({createAuthenticatedFetch:e}))),i=Jc[t],o=await n(t);return new Kc({modelName:i,apiKey:"dummy-key",useResponsesApi:!0,zdrEnabled:!0,configuration:{baseURL:o,fetch:await s({config:r,withCredentials:!0})}})};var Cg=(e,t)=>{let r=ln.fromTemplate(e);return Te.fromMessages([r,...t])};var Be=async e=>{let{promptText:t,modelTier:r="default",messages:n,inputVariables:s,schema:i,config:o}=e,a=Cg(t,n??[]),c=(await Lr({modelTier:r,config:o})).withStructuredOutput(i);return await a.pipe(c).invoke(s??{},o)};var J=async(e,t)=>{let{dispatchCustomEvent:r}=await import("./ABORO35R.js");await r("trace_message",e,t)},Zs=async(e,t)=>{let{dispatchCustomEvent:r}=await import("./ABORO35R.js");await r("graph_ux_suggestion",e,t)};var w=We;var ei=(e,t)=>t,kg=(e,t)=>({...e,...t}),Eg=(e="",t)=>{let r=typeof t=="string"?t.trim():"";if(!r)return e;let n=e.trim();if(!n)return r;if(n===r)return e;let s=n.split(`
|
|
132
|
+
`),{lc_error_code:"UNREACHABLE_NODE"});for(let n of r)if(n!=="__end__"&&!(n in this.nodes))throw new Error(`Found edge ending at unknown node \`${n}\``);if(e){for(let n of e)if(!(n in this.nodes))throw new Error(`Interrupt node \`${n}\` is not present`)}this.compiled=!0}},da=class extends Js{builder;constructor({builder:e,...t}){super(t),this.builder=e}withConfig(e){return super.withConfig(e)}attachNode(e,t){this.channels[e]=new Ue,this.nodes[e]=new Fe({channels:[],triggers:[],metadata:t.metadata,subgraphs:t.subgraphs,ends:t.ends}).pipe(t.runnable).pipe(new Y([{channel:e,value:be}],[X])),this.streamChannels.push(e)}attachEdge(e,t){if(t==="__end__"){if(e==="__start__")throw new Error("Cannot have an edge from START to END");this.nodes[e].writers.push(new Y([{channel:L,value:be}],[X]))}else this.nodes[t].triggers.push(e),this.nodes[t].channels.push(e)}attachBranch(e,t,r){e==="__start__"&&!this.nodes.__start__&&(this.nodes[U]=uh.subscribeTo(U,{tags:[X]})),this.nodes[e].pipe(r.run(s=>new Y(s.map(i=>re(i)?i:{channel:i==="__end__"?L:`branch:${e}:${t}:${i}`,value:be}),[X])));let n=r.ends?Object.values(r.ends):Object.keys(this.nodes);for(let s of n)if(s!=="__end__"){let i=`branch:${e}:${t}:${s}`;this.channels[i]=new Ue,this.nodes[s].triggers.push(i),this.nodes[s].channels.push(i)}}async getGraphAsync(e){let t=e?.xray,r=new gi,n={[U]:r.addNode({schema:We.any()},U)},s={},i={};t&&(i=Object.fromEntries((await Le(this.getSubgraphsAsync())).filter(l=>hh(l[1]))));let o=[];function a(l,u,p,h=!1){if(u==="__end__"&&s.__end__===void 0&&(s[L]=r.addNode({schema:We.any()},L)),n[l]!==void 0){if(s[u]===void 0)throw new Error(`End node ${u} not found!`);return o.push({src:l,dest:u,conditional:h}),r.addEdge(n[l],s[u],p!==u?p:void 0,h)}}for(let[l,u]of Object.entries(this.builder.nodes)){let p=se(l),h=u.runnable,d=u.metadata??{};if(this.interruptBefore?.includes(l)&&this.interruptAfter?.includes(l)?d.__interrupt="before,after":this.interruptBefore?.includes(l)?d.__interrupt="before":this.interruptAfter?.includes(l)&&(d.__interrupt="after"),t){let m=typeof t=="number"?t-1:t,f=i[l]!==void 0?await i[l].getGraphAsync({...e,xray:m}):h.getGraph(e);if(f.trimFirstNode(),f.trimLastNode(),Object.keys(f.nodes).length>1){let _=function(C){return C?C.lc_runnable:!1},S=function(C,I){if(C!==void 0&&!ai(C))return C;if(_(I))try{let M=I.getName();return M=M.startsWith("Runnable")?M.slice(8):M,M}catch{return I.getName()}else return I.name??"UnknownSchema"},[g,y]=r.extend(f,p);if(g===void 0)throw new Error(`Could not extend subgraph "${l}" due to missing entrypoint.`);y!==void 0&&(n[p]={name:S(y.id,y.data),...y}),s[p]={name:S(g.id,g.data),...g}}else{let g=r.addNode(h,p,d);n[p]=g,s[p]=g}}else{let m=r.addNode(h,p,d);n[p]=m,s[p]=m}}let c=[...this.builder.allEdges].sort(([l],[u])=>l<u?-1:u>l?1:0);for(let[l,u]of c)a(se(l),se(u));for(let[l,u]of Object.entries(this.builder.branches)){let p={...Object.fromEntries(Object.keys(this.builder.nodes).filter(h=>h!==l).map(h=>[se(h),se(h)])),[L]:L};for(let h of Object.values(u)){let d;h.ends!==void 0?d=h.ends:d=p;for(let[m,f]of Object.entries(d))a(se(l),se(f),m,!0)}}for(let[l,u]of Object.entries(this.builder.nodes))if(u.ends!==void 0)for(let p of u.ends)a(se(l),se(p),void 0,!0);return dh(this.builder.nodes,o,a),r}getGraph(e){let t=e?.xray,r=new gi,n={[U]:r.addNode({schema:We.any()},U)},s={},i={};t&&(i=Object.fromEntries(Pt(this.getSubgraphs()).filter(l=>hh(l[1]))));let o=[];function a(l,u,p,h=!1){if(u==="__end__"&&s.__end__===void 0&&(s[L]=r.addNode({schema:We.any()},L)),n[l]!==void 0){if(s[u]===void 0)throw new Error(`End node ${u} not found!`);return o.push({src:l,dest:u,conditional:h}),r.addEdge(n[l],s[u],p!==u?p:void 0,h)}}for(let[l,u]of Object.entries(this.builder.nodes)){let p=se(l),h=u.runnable,d=u.metadata??{};if(this.interruptBefore?.includes(l)&&this.interruptAfter?.includes(l)?d.__interrupt="before,after":this.interruptBefore?.includes(l)?d.__interrupt="before":this.interruptAfter?.includes(l)&&(d.__interrupt="after"),t){let m=typeof t=="number"?t-1:t,f=i[l]!==void 0?i[l].getGraph({...e,xray:m}):h.getGraph(e);if(f.trimFirstNode(),f.trimLastNode(),Object.keys(f.nodes).length>1){let _=function(C){return C?C.lc_runnable:!1},S=function(C,I){if(C!==void 0&&!ai(C))return C;if(_(I))try{let M=I.getName();return M=M.startsWith("Runnable")?M.slice(8):M,M}catch{return I.getName()}else return I.name??"UnknownSchema"},[g,y]=r.extend(f,p);if(g===void 0)throw new Error(`Could not extend subgraph "${l}" due to missing entrypoint.`);y!==void 0&&(n[p]={name:S(y.id,y.data),...y}),s[p]={name:S(g.id,g.data),...g}}else{let g=r.addNode(h,p,d);n[p]=g,s[p]=g}}else{let m=r.addNode(h,p,d);n[p]=m,s[p]=m}}let c=[...this.builder.allEdges].sort(([l],[u])=>l<u?-1:u>l?1:0);for(let[l,u]of c)a(se(l),se(u));for(let[l,u]of Object.entries(this.builder.branches)){let p={...Object.fromEntries(Object.keys(this.builder.nodes).filter(h=>h!==l).map(h=>[se(h),se(h)])),[L]:L};for(let h of Object.values(u)){let d;h.ends!==void 0?d=h.ends:d=p;for(let[m,f]of Object.entries(d))a(se(l),se(f),m,!0)}}for(let[l,u]of Object.entries(this.builder.nodes))if(u.ends!==void 0)for(let p of u.ends)a(se(l),se(p),void 0,!0);return dh(this.builder.nodes,o,a),r}};function hh(e){return typeof e.attachNode=="function"&&typeof e.attachEdge=="function"}function se(e){return e==="subgraph"?`"${e}"`:e}function dh(e,t,r){let n=new Set(t.map(i=>i.src)),s=[...new Set(t.filter(i=>!i.conditional&&i.dest!=="__end__").map(i=>i.dest))].sort();for(let i of s){if(n.has(i))continue;let o=Object.keys(e).find(a=>se(a)===i);o!==void 0&&e[o]?.isErrorHandler||r(i,L)}}function $t(e){return typeof e=="object"&&e!==null&&"~standard"in e&&typeof e["~standard"]=="object"&&e["~standard"]!==null&&"validate"in e["~standard"]}function mh(e){return typeof e=="object"&&e!==null&&"~standard"in e&&typeof e["~standard"]=="object"&&e["~standard"]!==null&&"jsonSchema"in e["~standard"]}function jt(e){if(mh(e))try{return e["~standard"].jsonSchema.input({target:"draft-07"})}catch{return}}function wt(e){if(e!=null&&$t(e))try{let t=e["~standard"].validate(void 0);if(t&&typeof t=="object"&&!("then"in t&&typeof t.then=="function")){let r=t;if(!r.issues){let n=r.value;return()=>n}}}catch{}}var mg=e=>e!=null&&e.lc_graph_name==="DeltaChannel",Ys=class fh extends Q{lc_graph_name="DeltaChannel";value;reducer;snapshotFrequency;initialValueFactory;constructor(t,r){super();let n=r?.snapshotFrequency??1e3;if(!Number.isInteger(n)||n<=0)throw new Error(`snapshotFrequency must be a positive integer, got ${n}`);this.reducer=t,this.snapshotFrequency=n,this.initialValueFactory=r?.initialValueFactory??(()=>[]),this.value=void 0}fromCheckpoint(t){let r=new fh(this.reducer,{snapshotFrequency:this.snapshotFrequency,initialValueFactory:this.initialValueFactory});return t===void 0?r.value=this.initialValueFactory():Pi(t)?r.value=t.value:r.value=t,r}replayWrites(t){let r=t.map(o=>o[2]);if(r.length===0)return;let n=this.value,s=0;for(let o=0;o<r.length;o+=1){let[a,c]=Oe(r[o]);a&&(n=c??this.initialValueFactory(),s=o+1)}let i=r.slice(s);this.value=i.length>0?this.reducer(n,i):n}update(t){if(t.length===0)return!1;let r,n=!1;for(let i of t)if(Kt(i)){if(n)throw new R("Can receive only one Overwrite value per step.");n=!0,[,r]=Oe(i)}if(n)return this.value=r??this.initialValueFactory(),!0;let s=this.value===void 0?this.initialValueFactory():this.value;return this.value=this.reducer(s,t),!0}get(){if(this.value===void 0)throw new F;return this.value}checkpoint(){}isAvailable(){return this.value!==void 0}equals(t){return this===t?!0:!mg(t)||this.snapshotFrequency!==t.snapshotFrequency?!1:this.reducer===t.reducer}};var ma=Symbol.for("langgraph.channel.missing"),Xs=class gh extends Q{lc_graph_name="UntrackedValue";guard;_value=ma;initialValueFactory;constructor(t){super(),this.guard=t?.guard??!0,this.initialValueFactory=t?.initialValueFactory,this.initialValueFactory&&(this._value=this.initialValueFactory())}fromCheckpoint(t){return new gh({guard:this.guard,initialValueFactory:this.initialValueFactory})}update(t){if(t.length===0)return!1;if(t.length!==1&&this.guard)throw new R("UntrackedValue(guard=true) can receive only one value per step. Use guard=false if you want to store any one of multiple values.",{lc_error_code:"INVALID_CONCURRENT_GRAPH_UPDATE"});return this._value=t[t.length-1],!0}get(){if(this._value===ma)throw new F;return this._value}checkpoint(){}isAvailable(){return this._value!==ma}};var Lt=(e,t)=>e.size===t.size&&[...e].every(r=>t.has(r)),fa=class yh extends Q{lc_graph_name="NamedBarrierValue";names;seen;constructor(t){super(),this.names=t,this.seen=new Set}fromCheckpoint(t){let r=new yh(this.names);return typeof t<"u"&&(r.seen=new Set(t)),r}update(t){let r=!1;for(let n of t)if(this.names.has(n))this.seen.has(n)||(this.seen.add(n),r=!0);else throw new R(`Value ${JSON.stringify(n)} not in names ${JSON.stringify(this.names)}`);return r}get(){if(!Lt(this.names,this.seen))throw new F}checkpoint(){return[...this.seen]}consume(){return this.seen&&this.names&&Lt(this.seen,this.names)?(this.seen=new Set,!0):!1}isAvailable(){return!!this.names&&Lt(this.names,this.seen)}},ga=class _h extends Q{lc_graph_name="NamedBarrierValueAfterFinish";names;seen;finished;constructor(t){super(),this.names=t,this.seen=new Set,this.finished=!1}fromCheckpoint(t){let r=new _h(this.names);if(typeof t<"u"){let[n,s]=t;r.seen=new Set(n),r.finished=s}return r}update(t){let r=!1;for(let n of t)if(this.names.has(n)&&!this.seen.has(n))this.seen.add(n),r=!0;else if(!this.names.has(n))throw new R(`Value ${JSON.stringify(n)} not in names ${JSON.stringify(this.names)}`);return r}get(){if(!this.finished||!Lt(this.names,this.seen))throw new F}checkpoint(){return[[...this.seen],this.finished]}consume(){return this.finished&&this.seen&&this.names&&Lt(this.seen,this.names)?(this.seen=new Set,this.finished=!1,!0):!1}finish(){return!this.finished&&this.names&&Lt(this.names,this.seen)?(this.finished=!0,!0):!1}isAvailable(){return this.finished&&!!this.names&&Lt(this.names,this.seen)}};var ya=Symbol.for("langgraph.state.reduced_value"),bt=class{[ya]=!0;valueSchema;inputSchema;reducer;jsonSchemaExtra;constructor(e,t){this.reducer=t.reducer,this.jsonSchemaExtra=t.jsonSchemaExtra,this.valueSchema=e,this.inputSchema="inputSchema"in t?t.inputSchema:e,this.jsonSchemaExtra=t.jsonSchemaExtra}static isInstance(e){return typeof e=="object"&&e!==null&&ya in e&&e[ya]===!0}};var wh=Symbol.for("langgraph.state.untracked_value"),sr=class{[wh]=!0;schema;guard;constructor(e,t){this.schema=e,this.guard=t?.guard??!0}static isInstance(e){return typeof e=="object"&&e!==null&&wh in e}};var _a=Symbol.for("langgraph.state.delta_value"),vt=class{[_a]=!0;valueSchema;inputSchema;reducer;snapshotFrequency;jsonSchemaExtra;constructor(e,t){this.reducer=t.reducer,this.valueSchema=e,this.inputSchema="inputSchema"in t?t.inputSchema:e,this.snapshotFrequency=t.snapshotFrequency,this.jsonSchemaExtra=t.jsonSchemaExtra}static isInstance(e){return typeof e=="object"&&e!==null&&_a in e&&e[_a]===!0}};var wa=Symbol.for("langgraph.state.state_schema"),Ge=class{[wa]=!0;constructor(e){this.fields=e}getChannels(){let e={};for(let[t,r]of Object.entries(this.fields))if(vt.isInstance(r)){let n=wt(r.valueSchema);e[t]=new Ys(r.reducer,{snapshotFrequency:r.snapshotFrequency,initialValueFactory:n})}else if(bt.isInstance(r)){let n=wt(r.valueSchema);e[t]=new gt(r.reducer,n)}else if(sr.isInstance(r)){let n=r.schema?wt(r.schema):void 0;e[t]=new Xs({guard:r.guard,initialValueFactory:n})}else if($t(r))e[t]=new je(wt(r));else throw new Error(`Invalid state field "${t}": must be a schema, ReducedValue, DeltaValue, UntrackedValue, or ManagedValue`);return e}getJsonSchema(){let e={},t=[];for(let[r,n]of Object.entries(this.fields)){let s;if(vt.isInstance(n)||bt.isInstance(n)?(s=jt(n.valueSchema),n.jsonSchemaExtra&&(s={...s??{},...n.jsonSchemaExtra})):sr.isInstance(n)?s=n.schema?jt(n.schema):void 0:$t(n)&&(s=jt(n)),s){e[r]=s;let i=!1;vt.isInstance(n)||bt.isInstance(n)?i=wt(n.valueSchema)!==void 0:sr.isInstance(n)?i=n.schema?wt(n.schema)!==void 0:!1:i=wt(n)!==void 0,i||t.push(r)}}return{type:"object",properties:e,required:t.length>0?t:void 0}}getInputJsonSchema(){let e={};for(let[t,r]of Object.entries(this.fields)){let n;vt.isInstance(r)||bt.isInstance(r)?(n=jt(r.inputSchema),r.jsonSchemaExtra&&(n={...n??{},...r.jsonSchemaExtra})):sr.isInstance(r)?n=r.schema?jt(r.schema):void 0:$t(r)&&(n=jt(r)),n&&(e[t]=n)}return{type:"object",properties:e}}getChannelKeys(){return Object.entries(this.fields).map(([e])=>e)}getAllKeys(){return Object.keys(this.fields)}async validateInput(e){if(e==null||typeof e!="object")return e;let t={};for(let[r,n]of Object.entries(e)){let s=this.fields[r];if(s===void 0){t[r]=n;continue}let i;if(vt.isInstance(s)||bt.isInstance(s)){let[o,a]=Oe(n);if(o){i=s.valueSchema;let c=await i["~standard"].validate(a);if(c.issues)throw new Error(`Validation failed for field "${r}": ${JSON.stringify(c.issues)}`);t[r]={[Ke]:c.value};continue}i=s.inputSchema}else sr.isInstance(s)?i=s.schema:$t(s)&&(i=s);if(i){let o=await i["~standard"].validate(n);if(o.issues)throw new Error(`Validation failed for field "${r}": ${JSON.stringify(o.issues)}`);t[r]=o.value}else t[r]=n}return t}static isInstance(e){return typeof e=="object"&&e!==null&&wa in e&&e[wa]===!0}};function ir(e,t){let r=Array.isArray(e)?e:[e],n=Array.isArray(t)?t:[t],s=r.map(qe),i=n.map(qe);for(let u of s)(u.id===null||u.id===void 0)&&(u.id=Gr(),u.lc_kwargs.id=u.id);let o;for(let u=0;u<i.length;u+=1){let p=i[u];(p.id===null||p.id===void 0)&&(p.id=Gr(),p.lc_kwargs.id=p.id),pr.isInstance(p)&&p.id==="__remove_all__"&&(o=u)}if(o!=null)return i.slice(o+1);let a=[...s],c=new Map(a.map((u,p)=>[u.id,p])),l=new Set;for(let u of i){let p=c.get(u.id);if(p!==void 0)pr.isInstance(u)?l.add(u.id):(l.delete(u.id),a[p]=u);else{if(pr.isInstance(u))throw new Error(`Attempting to delete a message with an ID that doesn't exist ('${u.id}')`);c.set(u.id,a.length),a.push(u)}}return a.filter(u=>!l.has(u.id))}function ba(e,t){let r=[];for(let a of t)Array.isArray(a)?r.push(...a):r.push(a);let n=e.length>0&&ee.isInstance(e[0])?e:e.map(qe),s=r.map(qe),i=new Map;for(let a=0;a<n.length;a+=1){let c=n[a].id;c!=null&&i.set(c,a)}let o=[...n];for(let a of s){let c=a.id;pr.isInstance(a)&&c==="__remove_all__"?(o.length=0,i.clear()):c==null?o.push(a):pr.isInstance(a)?i.has(c)&&(o[i.get(c)]=null,i.delete(c)):i.has(c)?o[i.get(c)]=a:(i.set(c,o.length),o.push(a))}return o.filter(a=>a!==null)}var bh=We.custom().default(()=>[]),vh=We.custom(),fg=new bt(bh,{inputSchema:vh,reducer:ir,jsonSchemaExtra:{langgraph_type:"messages",description:"A list of chat messages"}}),gg=new vt(bh,{inputSchema:vh,reducer:ba,jsonSchemaExtra:{langgraph_type:"messages",description:"A list of chat messages"}});var yg=class{_map=new Map;_extensionCache=new Map;get(e){return this._map.get(e)}extend(e,t){let r=this.get(e);this._map.set(e,t(r))}remove(e){return this._map.delete(e),this}has(e){return this._map.has(e)}getChannelsForSchema(e){let t={},r=qr(e);for(let[n,s]of Object.entries(r)){let i=this.get(s);i?.reducer?t[n]=new gt(i.reducer.fn,i.default):t[n]=new je(i?.default)}return t}getExtendedChannelSchemas(e,t){if(Object.keys(t).length===0)return e;let r=Object.entries(t).filter(([,i])=>i===!0).sort(([i],[o])=>i.localeCompare(o)).map(([i,o])=>`${i}:${o}`).join("|"),n=this._extensionCache.get(r)??new Map;if(n.has(e))return n.get(e);let s=e;if(t.withReducerSchema||t.withJsonSchemaExtrasAsDescription){let i=Object.entries(qr(e)).map(([o,a])=>{let c=this.get(a),l=t.withReducerSchema?c?.reducer?.schema??a:a;if(t.withJsonSchemaExtrasAsDescription&&c?.jsonSchemaExtra){let u=mi(l)??mi(a),p=JSON.stringify({...c.jsonSchemaExtra,description:u});l=l.describe(`lg:${p}`)}return[o,l]});s=yc(e,Object.fromEntries(i)),gc(s)&&(s._def.unknownKeys="strip")}return t.asPartial&&(s=fr(s)),n.set(e,s),this._extensionCache.set(r,n),s}},An=new yg;function Sh(e,t){if(t.reducer&&!t.default){let r=_c(e);r!=null&&(t.default=r)}if(t.reducer){let r=Object.assign(e,{lg_reducer_schema:t.reducer?.schema??e});return An.extend(r,()=>t),r}else return An.extend(e,()=>t),e}function or(e){return e==null?!1:!!(Ge.isInstance(e)||ge(e)||typeof e=="object"&&"lc_graph_name"in e&&e.lc_graph_name==="AnnotationRoot"||typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length>0&&Object.values(e).every(t=>typeof t=="function"||Oo(t)))}function Ch(e){if(typeof e!="object"||e==null)return!1;let t=e,r="state"in t&&or(t.state),n="stateSchema"in t&&or(t.stateSchema),s="input"in t&&or(t.input);return!(!r&&!n&&!s||"input"in t&&t.input!=null&&!or(t.input)||"output"in t&&t.output!=null&&!or(t.output))}var St="__root__",jr="__default_error_handler__",Qs=Symbol.for("langgraph.state.partial"),Ft=class extends ha{channels={};waitingEdges=new Set;_schemaDefinition;_schemaRuntimeDefinition;_inputDefinition;_inputRuntimeDefinition;_outputDefinition;_outputRuntimeDefinition;_schemaDefinitions=new Map;_metaRegistry=An;_configSchema;_configRuntimeSchema;_interrupt;_writer;_nodeDefaults={};constructor(e,t){super();let r=this._normalizeToStateGraphInit(e,t),n=r.state??r.stateSchema??r.input;if(!n)throw new Xr;let s=this._getChannelsFromSchema(n);this._schemaDefinition=s,Ge.isInstance(n)?this._schemaRuntimeDefinition=n:ge(n)&&(this._schemaRuntimeDefinition=n),r.input?Ge.isInstance(r.input)?this._inputRuntimeDefinition=r.input:ge(r.input)?this._inputRuntimeDefinition=r.input:this._inputRuntimeDefinition=Qs:this._inputRuntimeDefinition=Qs,r.output?Ge.isInstance(r.output)?this._outputRuntimeDefinition=r.output:ge(r.output)?this._outputRuntimeDefinition=r.output:this._outputRuntimeDefinition=this._schemaRuntimeDefinition:this._outputRuntimeDefinition=this._schemaRuntimeDefinition;let i=r.input?this._getChannelsFromSchema(r.input):s,o=r.output?this._getChannelsFromSchema(r.output):s;this._inputDefinition=i,this._outputDefinition=o,this._addSchema(this._schemaDefinition),this._addSchema(this._inputDefinition),this._addSchema(this._outputDefinition),r.context&&ge(r.context)&&(this._configRuntimeSchema=r.context),this._interrupt=r.interrupt,this._writer=r.writer}setNodeDefaults(e){return e.retryPolicy!==void 0&&(this._nodeDefaults.retryPolicy=e.retryPolicy),e.cachePolicy!==void 0&&(this._nodeDefaults.cachePolicy=typeof e.cachePolicy=="boolean"?e.cachePolicy?{}:void 0:e.cachePolicy),e.timeout!==void 0&&(this._nodeDefaults.timeout=Bt(e.timeout)),e.errorHandler!==void 0&&(this._nodeDefaults.errorHandler=e.errorHandler),this}_createDefaultErrorHandlerSpec(){let e=this._nodeDefaults.errorHandler;if(e!==void 0)return{runnable:new oe({func:(t,r)=>{let n=r?.configurable?.[Jr];return e(t,n,r)},name:jr,trace:!1}),metadata:void 0,input:this._schemaDefinition,retryPolicy:void 0,cachePolicy:void 0,isErrorHandler:!0}}_normalizeToStateGraphInit(e,t){if(Ch(e)){if(ge(t)||Cs.isInstance(t))return{...e,context:t};let r=t;return{...e,input:e.input??r?.input,output:e.output??r?.output,context:e.context??r?.context,interrupt:e.interrupt??r?.interrupt,writer:e.writer??r?.writer,nodes:e.nodes??r?.nodes}}if(or(e)){if(ge(t)||Cs.isInstance(t))return{state:e,context:t};let r=t;return{state:e,input:r?.input,output:r?.output,context:r?.context,interrupt:r?.interrupt,writer:r?.writer,nodes:r?.nodes}}if(wg(e))return{state:_g(e.channels)};throw new Xr}_getChannelsFromSchema(e){if(Ge.isInstance(e))return e.getChannels();if(ge(e))return this._metaRegistry.getChannelsForSchema(e);if(typeof e=="object"&&"lc_graph_name"in e&&e.lc_graph_name==="AnnotationRoot")return e.spec;if(typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length>0)return e;throw new Xr("Invalid schema type. Expected StateSchema, Zod object, AnnotationRoot, or StateDefinition.")}get allEdges(){return new Set([...this.edges,...Array.from(this.waitingEdges).flatMap(([e,t])=>e.map(r=>[r,t]))])}_addSchema(e){if(!this._schemaDefinitions.has(e)){this._schemaDefinitions.set(e,e);for(let[t,r]of Object.entries(e)){let n;if(typeof r=="function"?n=r():n=r,this.channels[t]!==void 0){if(!this.channels[t].equals(n)&&n.lc_graph_name!=="LastValue")throw new Error(`Channel "${t}" already exists with a different type.`)}else this.channels[t]=n}}}addNode(...e){function t(n){return n.length>=1&&typeof n[0]!="string"}let r=t(e)?Array.isArray(e[0])?e[0]:Object.entries(e[0]).map(([n,s])=>[n,s]):[[e[0],e[1],e[2]]];if(r.length===0)throw new Error("No nodes provided in `addNode`");for(let[n,s,i]of r){if(n in this.channels)throw new Error(`${n} is already being used as a state attribute (a.k.a. a channel), cannot also be used as a node name.`);for(let h of["|",":"])if(n.includes(h))throw new Error(`"${h}" is a reserved character and is not allowed in node names.`);if(this.warnIfCompiled("Adding a node to a graph that has already been compiled. This will not be reflected in the compiled graph."),n in this.nodes)throw new Error(`Node \`${n}\` already present.`);if(n==="__end__"||n==="__start__")throw new Error(`Node \`${n}\` is reserved.`);let o=this._schemaDefinition;i?.input!==void 0&&(o=this._getChannelsFromSchema(i.input)),this._addSchema(o);let a;K.isRunnable(s)?a=s:typeof s=="function"?a=new oe({func:s,name:n,trace:!1}):a=ze(s);let c=i?.cachePolicy,l;c!==void 0&&(l=typeof c=="boolean"?c?{}:!1:c);let u;if(i?.errorHandler!==void 0){if(u=`__error_handler__${n}`,u in this.nodes)throw new Error(`Cannot add error handler to node \`${n}\`: the reserved name \`${u}\` is already in use. StateGraph registers \`__error_handler__<nodeName>\` when you pass \`errorHandler\` in addNode options. Remove or rename the existing node with that name (for example, you may have added it manually).`);let h=i.errorHandler,d={runnable:new oe({func:(m,f)=>{let g=f?.configurable?.[Jr];return h(m,g,f)},name:u,trace:!1}),metadata:void 0,input:o??this._schemaDefinition,retryPolicy:void 0,cachePolicy:void 0,isErrorHandler:!0};this.nodes[u]=d}let p={runnable:a,retryPolicy:i?.retryPolicy,cachePolicy:l,timeout:Bt(i?.timeout),metadata:i?.metadata,input:o??this._schemaDefinition,subgraphs:kn(a)?[a]:i?.subgraphs,ends:i?.ends,defer:i?.defer,errorHandlerNode:u};this.nodes[n]=p}return this}addEdge(e,t){if(typeof e=="string")return super.addEdge(e,t);this.compiled&&console.warn("Adding an edge to a graph that has already been compiled. This will not be reflected in the compiled graph.");for(let r of e){if(r==="__end__")throw new Error("END cannot be a start node");if(!Object.keys(this.nodes).some(n=>n===r))throw new Error(`Need to add a node named "${r}" first`)}if(t==="__end__")throw new Error("END cannot be an end node");if(!Object.keys(this.nodes).some(r=>r===t))throw new Error(`Need to add a node named "${t}" first`);return this.waitingEdges.add([e,t]),this}addSequence(e){let t=Array.isArray(e)?e:Object.entries(e);if(t.length===0)throw new Error("Sequence requires at least one node.");let r;for(let[n,s,i]of t){if(n in this.nodes)throw new Error(`Node names must be unique: node with the name "${n}" already exists.`);let o=n;this.addNode(n,s,i),r!=null&&this.addEdge(r,o),r=o}return this}compile({checkpointer:e,store:t,cache:r,interruptBefore:n,interruptAfter:s,name:i,description:o,transformers:a}={}){let c=this._createDefaultErrorHandlerSpec();if(c!==void 0){if(jr in this.nodes)throw new Error(`Cannot apply a default error handler: the reserved node name \`${jr}\` is already in use. setNodeDefaults({ errorHandler }) registers a node with that name; rename the conflicting node.`);this.nodes[jr]=c}try{return this._compileResolved({checkpointer:e,store:t,cache:r,interruptBefore:n,interruptAfter:s,name:i,description:o,transformers:a,defaultErrorHandlerNode:c!==void 0?jr:void 0})}finally{c!==void 0&&delete this.nodes[jr]}}_compileResolved({checkpointer:e,store:t,cache:r,interruptBefore:n,interruptAfter:s,name:i,description:o,transformers:a,defaultErrorHandlerNode:c}){this.validate([...Array.isArray(n)?n:[],...Array.isArray(s)?s:[]]);let l=Object.keys(this._schemaDefinitions.get(this._outputDefinition)),u=l.length===1&&l[0]===St?St:l,p=Object.keys(this.channels),h=p.length===1&&p[0]===St?St:p,d=this._interrupt,m=new Eh({builder:this,checkpointer:e,interruptAfter:s,interruptBefore:n,autoValidate:!1,nodes:{},channels:{...this.channels,[U]:new Ue},inputChannels:U,outputChannels:u,streamChannels:h,streamMode:"updates",store:t,cache:r,name:i,description:o,userInterrupt:d,streamTransformers:a});m.attachNode(U);let f=this._nodeDefaults,g=f.retryPolicy!==void 0||f.cachePolicy!==void 0||f.timeout!==void 0||c!==void 0;for(let[y,_]of Object.entries(this.nodes)){let S=_.isErrorHandler===!0,C=g?{..._,retryPolicy:_.retryPolicy??f.retryPolicy,cachePolicy:S||_.cachePolicy===!1?void 0:_.cachePolicy??f.cachePolicy,timeout:_.timeout??f.timeout,errorHandlerNode:!S&&c!==void 0&&_.errorHandlerNode===void 0?c:_.errorHandlerNode}:_;m.attachNode(y,C)}m.attachBranch(U,Si,kh(),{withReader:!1});for(let[y]of Object.entries(this.nodes))m.attachBranch(y,Si,kh(),{withReader:!1});for(let[y,_]of this.edges)m.attachEdge(y,_);for(let[y,_]of this.waitingEdges)m.attachEdge(y,_);for(let[y,_]of Object.entries(this.branches))for(let[S,C]of Object.entries(_))m.attachBranch(y,S,C);return m.validate()}};function _g(e){let t={};for(let[r,n]of Object.entries(e))r===St?t[r]=ks(n):t[r]=ks(n);return t}var Eh=class extends da{description;_metaRegistry=An;constructor({description:e,...t}){super(t),this.description=e}attachNode(e,t){let r;e==="__start__"?r=Object.entries(this.builder._schemaDefinitions.get(this.builder._inputDefinition)).map(([c])=>c):r=Object.keys(this.builder.channels);function n(c){if(ie(c))return c.graph===ye.PARENT?null:c._updateAsTuples();if(Array.isArray(c)&&c.length>0&&c.some(l=>ie(l))){let l=[];for(let u of c)if(ie(u)){if(u.graph===ye.PARENT)continue;l.push(...u._updateAsTuples())}else l.push([St,u]);return l}else if(c!=null)return[[St,c]];return null}let s=e,i=async c=>{if(c==null||c.length===0)return c;let l=this.builder._schemaRuntimeDefinition;if(Ge.isInstance(l)){let u=new Set(l.getChannelKeys());return Promise.all(c.map(async([p,h])=>{if(!u.has(p))return[p,h];let d=await l.validateInput({[p]:h});return[p,Object.prototype.hasOwnProperty.call(d,p)?d[p]:h]}))}if(ge(l)){let u=new Set(Object.keys(qr(l)));if(c.filter(([d])=>u.has(d)).length===0)return c;let p=fr(this._metaRegistry.getExtendedChannelSchemas(l,{withReducerSchema:!0})),h=fr(l);return c.map(([d,m])=>{if(!u.has(d))return[d,m];let[f,g]=Oe(m);if(f){let _=mr(h,{[d]:g});return[d,Object.prototype.hasOwnProperty.call(_,d)?{[Ke]:_[d]}:m]}let y=mr(p,{[d]:m});return[d,Object.prototype.hasOwnProperty.call(y,d)?y[d]:m]})}return c};async function o(c){if(c){if(ie(c))return c.graph===ye.PARENT?null:i(c._updateAsTuples().filter(([l])=>r.includes(l)));if(Array.isArray(c)&&c.length>0&&c.some(ie)){let l=[];for(let u of c)if(ie(u)){if(u.graph===ye.PARENT)continue;l.push(...u._updateAsTuples().filter(([p])=>r.includes(p)))}else{let p=await o(u);p&&l.push(...p??[])}return i(l)}else{if(typeof c=="object"&&!Array.isArray(c))return i(Object.entries(c).filter(([l])=>r.includes(l)));{let l=Array.isArray(c)?"array":typeof c;throw new R(`Expected node "${s.toString()}" to return an object or an array containing at least one Command object, received ${l}`,{lc_error_code:"INVALID_GRAPH_NODE_RETURN_VALUE"})}}}else return null}let a=[{value:be,mapper:new oe({func:r.length&&r[0]===St?n:o,trace:!1,recurse:!1})}];if(e==="__start__")this.nodes[e]=new Fe({tags:[X],triggers:[U],channels:[U],writers:[new Y(a,[X])]});else{let c=t?.input??this.builder._schemaDefinition,l=Object.fromEntries(Object.keys(this.builder._schemaDefinitions.get(c)).map(m=>[m,m])),u=Object.keys(l).length===1&&St in l,p=`branch:to:${e}`;this.channels[p]=t?.defer?new Do:new Ue(!1);let h=t?.cachePolicy,d=h===!1?void 0:h;this.nodes[e]=new Fe({triggers:[p],channels:u?Object.keys(l):l,writers:[new Y(a,[X])],mapper:u?void 0:m=>Object.fromEntries(Object.entries(m).filter(([f])=>f in l)),bound:t?.runnable,metadata:t?.metadata,retryPolicy:t?.retryPolicy,cachePolicy:d,timeout:t?.timeout,subgraphs:t?.subgraphs,ends:t?.ends,isErrorHandler:t?.isErrorHandler,errorHandlerNode:t?.errorHandlerNode})}}attachEdge(e,t){if(t!=="__end__"){if(typeof e=="string")this.nodes[e].writers.push(new Y([{channel:`branch:to:${t}`,value:null}],[X]));else if(Array.isArray(e)){let r=`join:${e.join("+")}:${t}`;this.channels[r]=this.builder.nodes[t].defer?new ga(new Set(e)):new fa(new Set(e)),this.nodes[t].triggers.push(r);for(let n of e)this.nodes[n].writers.push(new Y([{channel:r,value:n}],[X]))}}}attachBranch(e,t,r,n={withReader:!0}){let s=async(i,o)=>{let a=i.filter(l=>l!==L);if(!a.length)return;let c=a.map(l=>re(l)?l:{channel:l==="__end__"?l:`branch:to:${l}`,value:e});await Y.doWrite({...o,tags:(o.tags??[]).concat([X])},c)};this.nodes[e].writers.push(r.run(s,n.withReader?i=>Tp.doRead(i,this.streamChannels??this.outputChannels,!0):void 0))}async _validateInput(e){if(e==null)return e;let t=this.builder._inputRuntimeDefinition,r=this.builder._schemaRuntimeDefinition;if(Ge.isInstance(t)){if(ie(e)){let s=e;return e.update&&(s.update=await t.validateInput(Array.isArray(e.update)?Object.fromEntries(e.update):e.update)),s}return await t.validateInput(e)}if(t===Qs&&Ge.isInstance(r)){if(ie(e)){let s=e;return e.update&&(s.update=await r.validateInput(Array.isArray(e.update)?Object.fromEntries(e.update):e.update)),s}return await r.validateInput(e)}let n=(()=>{let s=i=>{if(i!=null)return this._metaRegistry.getExtendedChannelSchemas(i,{withReducerSchema:!0})};if(ge(t))return s(t);if(t===Qs)return ge(r)?fr(s(r)):void 0})();if(ie(e)){let s=e;if(e.update&&n!=null){let i=Array.isArray(e.update)?Object.fromEntries(e.update):e.update,o=mr(n,i);s.update=Object.fromEntries(Object.keys(i).map(a=>[a,o[a]]))}return s}return n!=null?mr(n,e):e}isInterrupted(e){return Jt(e)}async _validateContext(e){let t=this.builder._configRuntimeSchema;return ge(t)&&mr(t,e),e}};function wg(e){return typeof e=="object"&&e!==null&&e.channels!==void 0}function bg(e){if(re(e))return[e];let t=[];ie(e)?t.push(e):Array.isArray(e)&&t.push(...e.filter(ie));let r=[];for(let n of t){if(n.graph===ye.PARENT)throw new zn(n);re(n.goto)||typeof n.goto=="string"?r.push(n.goto):Array.isArray(n.goto)&&r.push(...n.goto)}return r}function kh(){return new pa({path:new oe({func:bg,tags:[X],trace:!1,recurse:!1,name:"<control_branch>"})})}var xh=function(t,r){let{name:n,checkpointer:s,store:i,cache:o}=typeof t=="string"?{name:t,checkpointer:void 0,store:void 0}:t,a=Bt(typeof t=="string"?void 0:t.timeout);if(xp(r)||Ip(r))throw new Error("Generators are disallowed as entrypoints. For streaming responses, use config.write.");let c="updates",l=$p(n,r);function u(m){return typeof m=="object"&&m!==null&&"__lg_type"in m&&m.__lg_type==="__pregel_final"}let p=new oe({name:"pluckReturnValue",func:m=>u(m)?m.value:m}),h=new oe({name:"pluckSaveValue",func:m=>u(m)?m.save:m}),d=new Fe({bound:l,triggers:[U],channels:[U],timeout:a,writers:[new Y([{channel:L,value:be,mapper:p},{channel:Tt,value:be,mapper:h}],[X])]});return new Js({name:n,checkpointer:s,nodes:{[n]:d},channels:{[U]:new Ue,[L]:new je,[Tt]:new je},inputChannels:U,outputChannels:L,streamChannels:L,streamMode:c,store:i,cache:o})};xh.final=function({value:t,save:r}){return{value:t,save:r,__lg_type:"__pregel_final"}};var vg=B.Root({messages:B({reducer:ir,default:()=>[]})}),Ih={reducer:{fn:ir},jsonSchemaExtra:{langgraph_type:"messages"},default:()=>[]},Sg=fi.object({messages:Sh(fi.custom(),Ih)});var Lr=async(e={})=>{let{modelTier:t="default",config:r}=e,{getChatAIUtilityServiceUrl:n}=await import("./6LST5YZY.js").then(m=>m.default),{createAuthenticatedFetch:s}=await import("./FQOOFBPI.js").then(m=>m.default.then(e=>({createAuthenticatedFetch:e}))),i=Jc[t],o=await n(t);return new Kc({modelName:i,apiKey:"dummy-key",useResponsesApi:!0,zdrEnabled:!0,configuration:{baseURL:o,fetch:await s({config:r,withCredentials:!0})}})};var Cg=(e,t)=>{let r=ln.fromTemplate(e);return Te.fromMessages([r,...t])};var Be=async e=>{let{promptText:t,modelTier:r="default",messages:n,inputVariables:s,schema:i,config:o}=e,a=Cg(t,n??[]),c=(await Lr({modelTier:r,config:o})).withStructuredOutput(i);return await a.pipe(c).invoke(s??{},o)};var J=async(e,t)=>{let{dispatchCustomEvent:r}=await import("./4TQWZ2KF.js");await r("trace_message",e,t)},Zs=async(e,t)=>{let{dispatchCustomEvent:r}=await import("./4TQWZ2KF.js");await r("graph_ux_suggestion",e,t)};var w=We;var ei=(e,t)=>t,kg=(e,t)=>({...e,...t}),Eg=(e="",t)=>{let r=typeof t=="string"?t.trim():"";if(!r)return e;let n=e.trim();if(!n)return r;if(n===r)return e;let s=n.split(`
|
|
133
133
|
|
|
134
134
|
`);return s[s.length-1]?.trim()===r?e:`${e}
|
|
135
135
|
|
|
136
|
-
${r}`},Th=()=>({userRequest:"",inputParts:[],assignedTask:"",messages:[],priorSteps:[],sharedState:{},sharedResources:[]}),ar=()=>({agentExecutionContext:B({reducer:kg,default:Th}),outputMessage:B({reducer:Eg,default:()=>""}),summary:B({reducer:ei,default:()=>""}),status:B({reducer:ei}),sharedStatePatch:B({reducer:ei}),sharedResourceAdditions:B({reducer:ei})});var Ah=async e=>{try{let{createEmbeddingModel:t}=await import("./
|
|
136
|
+
${r}`},Th=()=>({userRequest:"",inputParts:[],assignedTask:"",messages:[],priorSteps:[],sharedState:{},sharedResources:[]}),ar=()=>({agentExecutionContext:B({reducer:kg,default:Th}),outputMessage:B({reducer:Eg,default:()=>""}),summary:B({reducer:ei,default:()=>""}),status:B({reducer:ei}),sharedStatePatch:B({reducer:ei}),sharedResourceAdditions:B({reducer:ei})});var Ah=async e=>{try{let{createEmbeddingModel:t}=await import("./FQYC25GN.js").then(m=>m.default.then(e=>({createEmbeddingModel:e})));return await(await t()).embedDocuments(e)}catch(t){throw console.error("Failed to generate embeddings:",t),t}};var td=e=>{let{portal:t,user:r}=e??{};return!!e&&!!t&&!!r};function lr(e){if(!td(e))throw new Error("Invalid context: PortalAssistantContext with portal and user is required.")}var Ig=`
|
|
137
137
|
Write a concise, friendly success message for adding members to a group.
|
|
138
138
|
|
|
139
139
|
Rules:
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
2
|
var a={advanced:"gpt-6-astra",default:"gpt-6-sol",fast:"gpt-6-luna"},t={default:"text-embedding-ada-002"};export{a,t as b};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
2
|
var C={apps:"M58.9 8.192v19.16l-12.37 5.854L40 31.168v-.838l6.47 2.02 11.63-5.506V8.782L46.53 5.206l-11.63 5.47v5.487l-.8-.247v-5.748L46.47 4.35zM29 47.062l-8.03 3.8L5.9 46.16V22.669l15.13-7.117 15.07 4.659v16.643l.8-.376V19.62l-15.93-4.924L5.1 22.16v24.59l15.93 4.97L29 47.947zm20.9-6.302v13.73l-8.87 4.199-8.93-2.787v-13.73L40.97 38zm-.8.59l-8.07-2.495-8.13 3.824v12.634l8.07 2.52 8.13-3.85z",check:"M52.7446 9.43604L23.3496 38.869L14.0296 29.299L6.72461 36.765L23.3546 53.317L50.0616 26.609L59.9566 16.577L52.7446 9.43604ZM49.4926 26.046L23.3526 52.187L7.84961 36.757L14.0256 30.444L23.3396 40.008L52.7476 10.564L58.8236 16.584L49.4926 26.046Z",clock:"M27.9 5C23.3708 5 18.9433 6.34306 15.1775 8.85935C11.4116 11.3756 8.47642 14.9521 6.74317 19.1365C5.00992 23.321 4.55643 27.9254 5.44003 32.3676C6.32363 36.8097 8.50465 40.8901 11.7073 44.0927C14.9099 47.2954 18.9903 49.4764 23.4324 50.36C27.8746 51.2436 32.479 50.7901 36.6635 49.0568C40.8479 47.3236 44.4244 44.3884 46.9407 40.6226C49.457 36.8567 50.8 32.4292 50.8 27.9C50.7931 21.8287 48.3783 16.0079 44.0852 11.7149C39.7921 7.42176 33.9714 5.00688 27.9 5ZM27.9 50C23.529 50 19.2562 48.7039 15.6219 46.2755C11.9876 43.8471 9.15497 40.3955 7.48227 36.3573C5.80958 32.3191 5.37192 27.8755 6.22466 23.5885C7.07739 19.3015 9.18221 15.3637 12.273 12.2729C15.3637 9.1822 19.3015 7.07738 23.5885 6.22465C27.8755 5.37191 32.3191 5.80957 36.3573 7.48226C40.3956 9.15496 43.8471 11.9876 46.2755 15.6219C48.7039 19.2562 50 23.529 50 27.9C49.9934 33.7593 47.6629 39.3766 43.5198 43.5198C39.3766 47.6629 33.7593 49.9934 27.9 50ZM28.8 29H41.9V29.8H28V8.9H28.8V29ZM27.9 0C22.3819 0 16.9877 1.63631 12.3996 4.702C7.81147 7.76769 4.23546 12.1251 2.12377 17.2231C0.0120885 22.3212 -0.540424 27.931 0.536103 33.343C1.61263 38.7551 4.26985 43.7264 8.17173 47.6283C12.0736 51.5302 17.0449 54.1874 22.457 55.2639C27.8691 56.3404 33.4788 55.7879 38.5769 53.6762C43.6749 51.5646 48.0323 47.9885 51.098 43.4004C54.1637 38.8123 55.8 33.4181 55.8 27.9C55.7918 20.503 52.8497 13.4113 47.6192 8.18078C42.3887 2.9503 35.297 0.00820525 27.9 0ZM27.9 55C22.5401 55 17.3006 53.4106 12.8441 50.4328C8.38749 47.455 4.91401 43.2226 2.86288 38.2707C0.811743 33.3188 0.275072 27.8699 1.32073 22.6131C2.36639 17.3562 4.94742 12.5274 8.73742 8.73741C12.5274 4.9474 17.3562 2.36638 22.6131 1.32072C27.87 0.275059 33.3189 0.81173 38.2707 2.86286C43.2226 4.914 47.4551 8.38747 50.4328 12.844C53.4106 17.3006 55 22.5401 55 27.9C54.9918 35.0848 52.134 41.9731 47.0535 47.0535C41.9731 52.134 35.0849 54.9918 27.9 55Z",couple:"M21.0004 42.5221C21.0004 42.6521 21.0274 42.7741 21.0384 42.9001H10.4914C9.8594 42.9009 9.25285 42.651 8.80481 42.2052C8.35677 41.7594 8.10382 41.1541 8.10144 40.5221V37.8101C7.57536 37.6604 7.11701 37.3339 6.80368 36.8855C6.49036 36.4372 6.34122 35.8946 6.38144 35.3491L7.24444 23.5751C7.34973 22.091 8.01261 20.7017 9.09995 19.6861C10.1873 18.6705 11.6186 18.1039 13.1064 18.1001H20.2874C21.5492 18.1064 22.7748 18.5226 23.7794 19.2861C23.5479 19.4375 23.3242 19.6007 23.1094 19.7751C22.2775 19.2076 21.2945 18.9028 20.2874 18.9001H13.1064C11.8206 18.9032 10.5836 19.3929 9.644 20.2707C8.70441 21.1485 8.13187 22.3494 8.04144 23.6321L7.18044 35.4071C7.15105 35.8094 7.27686 36.2077 7.53203 36.5202C7.7872 36.8326 8.15234 37.0355 8.55244 37.0871L8.90144 37.1331V40.5231C8.90382 40.9429 9.07251 41.3446 9.37055 41.6402C9.66859 41.9358 10.0717 42.1012 10.4914 42.1001H21.0004V42.5221ZM10.1004 9.5001C10.1004 8.2343 10.4758 6.99693 11.179 5.94445C11.8823 4.89198 12.8818 4.07167 14.0513 3.58727C15.2207 3.10287 16.5075 2.97613 17.749 3.22307C18.9905 3.47002 20.1309 4.07956 21.0259 4.97462C21.921 5.86967 22.5305 7.01004 22.7775 8.25152C23.0244 9.493 22.8977 10.7798 22.4133 11.9493C21.9289 13.1187 21.1086 14.1183 20.0561 14.8215C19.0036 15.5247 17.7662 15.9001 16.5004 15.9001C14.8036 15.8982 13.1768 15.2234 11.977 14.0235C10.7772 12.8237 10.1023 11.1969 10.1004 9.5001ZM10.9004 9.5001C10.9004 10.6077 11.2289 11.6904 11.8442 12.6113C12.4595 13.5322 13.3341 14.25 14.3574 14.6738C15.3807 15.0977 16.5066 15.2086 17.5929 14.9925C18.6792 14.7764 19.6771 14.2431 20.4602 13.4599C21.2434 12.6767 21.7768 11.6789 21.9928 10.5926C22.2089 9.50631 22.098 8.38034 21.6742 7.35707C21.2503 6.33381 20.5325 5.45921 19.6116 4.84387C18.6907 4.22853 17.608 3.9001 16.5004 3.9001C15.0157 3.90169 13.5923 4.4922 12.5424 5.54206C11.4925 6.59192 10.902 8.01538 10.9004 9.5001ZM41.1504 25.5771L42.0124 37.3491C42.0578 37.9632 41.8629 38.571 41.4689 39.0443C41.075 39.5175 40.5126 39.8194 39.9004 39.8861V42.5221C39.8981 43.1541 39.6451 43.7594 39.1971 44.2052C38.749 44.651 38.1425 44.9009 37.5104 44.9001H25.4904C24.8584 44.9009 24.2518 44.651 23.8038 44.2052C23.3558 43.7594 23.1028 43.1541 23.1004 42.5221V39.8101C22.5744 39.6604 22.116 39.3339 21.8027 38.8855C21.4894 38.4372 21.3402 37.8946 21.3804 37.3491L22.2444 25.5751C22.3497 24.091 23.0126 22.7017 24.1 21.6861C25.1873 20.6705 26.6186 20.1039 28.1064 20.1001H35.2874C36.7755 20.1042 38.207 20.6712 39.2943 21.6871C40.3817 22.703 41.0444 24.0927 41.1494 25.5771H41.1504ZM41.2144 37.4071L40.3524 25.6341C40.2625 24.3511 39.6902 23.1497 38.7505 22.2715C37.8109 21.3932 36.5736 20.9033 35.2874 20.9001H28.1064C26.8208 20.9035 25.584 21.3933 24.6446 22.2711C23.7053 23.1489 23.1329 24.3496 23.0424 25.6321L22.1794 37.4071C22.15 37.8094 22.2759 38.2077 22.531 38.5202C22.7862 38.8326 23.1513 39.0355 23.5514 39.0871L23.9004 39.1331V42.5231C23.9028 42.9429 24.0715 43.3446 24.3696 43.6402C24.6676 43.9358 25.0707 44.1012 25.4904 44.1001H37.5104C37.9304 44.1012 38.3336 43.9356 38.6317 43.6398C38.9297 43.344 39.0983 42.942 39.1004 42.5221V39.1001H39.6424C39.8593 39.1001 40.0738 39.0554 40.2726 38.9688C40.4714 38.8821 40.6501 38.7554 40.7977 38.5965C40.9452 38.4376 41.0584 38.2499 41.1301 38.0452C41.2018 37.8406 41.2305 37.6234 41.2144 37.4071ZM25.1004 11.5001C25.1004 10.2343 25.4758 8.99693 26.179 7.94445C26.8823 6.89198 27.8818 6.07167 29.0513 5.58727C30.2207 5.10287 31.5075 4.97613 32.749 5.22307C33.9905 5.47002 35.1309 6.07956 36.0259 6.97462C36.921 7.86967 37.5305 9.01004 37.7775 10.2515C38.0244 11.493 37.8977 12.7798 37.4133 13.9493C36.9289 15.1187 36.1086 16.1183 35.0561 16.8215C34.0036 17.5247 32.7662 17.9001 31.5004 17.9001C29.8036 17.8982 28.1768 17.2234 26.977 16.0235C25.7772 14.8237 25.1023 13.1969 25.1004 11.5001ZM25.9004 11.5001C25.9004 12.6077 26.2289 13.6904 26.8442 14.6113C27.4595 15.5322 28.3341 16.25 29.3574 16.6738C30.3807 17.0977 31.5066 17.2086 32.5929 16.9925C33.6792 16.7764 34.6771 16.2431 35.4602 15.4599C36.2434 14.6767 36.7768 13.6789 36.9928 12.5926C37.2089 11.5063 37.098 10.3803 36.6742 9.35707C36.2503 8.33381 35.5325 7.45921 34.6116 6.84387C33.6907 6.22853 32.608 5.9001 31.5004 5.9001C30.0157 5.90169 28.5923 6.4922 27.5424 7.54206C26.4925 8.59192 25.902 10.0154 25.9004 11.5001Z",search:"M60.2174 54.9368L44.4474 39.1668L43.0335 40.5818L39.2324 36.7818C42.5371 32.8472 44.1953 27.7888 43.8613 22.6614C43.5272 17.5339 41.2268 12.7334 37.4396 9.26076C33.6524 5.78813 28.6709 3.9115 23.5338 4.02221C18.3967 4.13292 13.5007 6.22243 9.86661 9.855C6.23256 13.4876 4.14106 18.3828 4.02825 23.5198C3.91544 28.6569 5.79003 33.6391 9.26112 37.4277C12.7322 41.2163 17.5318 43.5188 22.6591 43.8549C27.7864 44.191 32.8455 42.5349 36.7814 39.2318L40.5835 43.0338L39.1704 44.4488L54.9375 60.2158C55.2636 60.5418 55.7058 60.725 56.167 60.725C56.6281 60.725 57.0703 60.5418 57.3965 60.2158L60.2164 57.3948C60.5414 57.0684 60.7239 56.6265 60.7239 56.1658C60.7239 55.7052 60.5424 55.2633 60.2174 54.9368ZM4.90045 23.9998C4.90045 20.2222 6.02064 16.5294 8.11938 13.3884C10.2181 10.2475 13.2011 7.79936 16.6912 6.35372C20.1813 4.90809 24.0216 4.52984 27.7267 5.26682C31.4317 6.0038 34.835 7.8229 37.5062 10.4941C40.1774 13.1653 41.9965 16.5686 42.7334 20.2736C43.4704 23.9786 43.0922 27.819 41.6465 31.3091C40.2009 34.7991 37.7528 37.7822 34.6118 39.8809C31.4709 41.9796 27.7781 43.0998 24.0004 43.0998C18.9365 43.0943 14.0816 41.0802 10.5008 37.4994C6.92011 33.9187 4.90601 29.0637 4.90045 23.9998ZM37.3745 38.6928C37.8344 38.2728 38.2745 37.8328 38.6945 37.3728L42.4684 41.1478L41.1484 42.4678L37.3745 38.6928ZM59.6505 56.8298L56.8305 59.6498C56.6507 59.8184 56.4134 59.9122 56.167 59.9122C55.9205 59.9122 55.6832 59.8184 55.5034 59.6498L40.3004 44.4498L44.4454 40.2998L59.6505 55.5008C59.7377 55.588 59.8068 55.6915 59.854 55.8055C59.9012 55.9194 59.9255 56.0415 59.9255 56.1648C59.9255 56.2881 59.9012 56.4102 59.854 56.5242C59.8068 56.6381 59.7377 56.7416 59.6505 56.8288V56.8298ZM22.3434 9.61982L22.4404 10.4148C22.2338 10.4402 22.0274 10.4688 21.8214 10.5008C18.9102 10.9718 16.2302 12.3739 14.1832 14.4969C12.1363 16.6199 10.8329 19.3494 10.4684 22.2758L10.4424 22.4928L9.64745 22.4088L9.67345 22.1808C10.0594 19.0818 11.4396 16.1914 13.6071 13.9431C15.7746 11.6948 18.6126 10.2098 21.6954 9.71082C21.9104 9.67682 22.1264 9.64682 22.3434 9.62082V9.61982Z"};export{C as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import c from"./
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import c from"./QUOPWSRC.js";import b from"./TJYPEMON.js";import"./VMQIDO4Z.js";import"./QS3GXAIH.js";import"./2GBRZSEC.js";import{a as f}from"./XUPYBBRI.js";import"./C5U7YKVI.js";import"./6BMWSGLA.js";import{L as d,M as h,O as p,R as g,S as y,h as m,j as a}from"./CWSEBETE.js";import"./R74ZHFA6.js";import"./UZLQALHY.js";export default $arcgis.t(([,{b:x}])=>{var $=m`:host{display:inline-flex;align-items:center}:host([scale="s"]){--arcgis-portal-item-type-font-size: var(--calcite-font-size--2);--arcgis-portal-item-type-spacing: 1rem}:host([scale="m"]){--arcgis-portal-item-type-font-size: var(--calcite-font-size--1);--arcgis-portal-item-type-spacing: 1rem}:host([scale="l"]){--arcgis-portal-item-type-font-size: var(--calcite-font-size-0);--arcgis-portal-item-type-spacing: 1rem}.icon{display:block;flex-grow:0;flex-shrink:0;width:var(--arcgis-portal-item-type-spacing);height:var(--arcgis-portal-item-type-spacing)}.text{color:var(--calcite-text-color-2);font-size:var(--arcgis-portal-item-type-font-size);line-height:1.25rem}.text--ellipsis{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.text--spaced{margin-inline-start:calc(var(--arcgis-portal-item-type-spacing) / 2);word-wrap:break-word;word-break:break-word}`,n=class extends d{constructor(){super(...arguments),this.messages=f({blocking:!0}),this.icon=null,this.displayName="",this.displayNameHosted="",this.scale="s"}static{this.properties={icon:16,displayName:16,displayNameHosted:16,item:0,serviceInfo:0,portal:0,user:0,scale:3,hideText:5,hideIcon:5,ellipsis:5,showHosted:5}}static{this.styles=$}async load(){this.item&&await this.getItemDisplayInformation()}async getItemDisplayInformation(){let{messages:o,user:r,serviceInfo:l,portal:e,item:t}=this,{displayName:i,displayNameHosted:c,icon:s}=await x({item:t,messages:o,serviceInfo:l,user:r,portal:e||t.portal});this.displayName=i,this.displayNameHosted=c,this.icon=s}render(){let{showHosted:o,displayNameHosted:r,scale:l,icon:e,hideText:t,hideIcon:i,ellipsis:c}=this;if(!e)return null;let s=o?r:this.displayName,v=s?.includes("(")?"":"‭",w=y(`./assets/portal-item-type/icons/${e}16.svg`),u=this.hideText?s:void 0;return a`${!i&&a`<span class="icon"><img src=${w??p} alt=${(u||"")??p} class=${`icon icon--${l}`}></span>`||""}${!t&&a`<span class=${h({text:!0,"text--spaced":!i,"text--ellipsis":c})} .innerHTML=${`${v}${s}`}></span>`||""}`}};g("arcgis-portal-item-type",n);return n},b,c)
|