@arcgis/portal-components 5.2.0-next.161 → 5.2.0-next.162

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.
Files changed (110) hide show
  1. package/dist/cdn/{ISYVN7OJ.js → 2DIAUHE5.js} +1 -1
  2. package/dist/cdn/{MFLWNE26.js → 2IKXUDFM.js} +1 -1
  3. package/dist/cdn/{7AE5JPLI.js → 2IRP3ZVE.js} +1 -1
  4. package/dist/cdn/{XKC6SPS4.js → 3HINDHV7.js} +1 -1
  5. package/dist/cdn/{UQ4HWYAB.js → 3NTQM2R7.js} +1 -1
  6. package/dist/cdn/{DZI45EWV.js → 3TLHOVLW.js} +1 -1
  7. package/dist/cdn/3ZHDGFSL.js +2 -0
  8. package/dist/cdn/42VKNALC.js +2 -0
  9. package/dist/cdn/{I7GIH6KF.js → 453JLSJV.js} +1 -1
  10. package/dist/cdn/{DUA4B2D2.js → 4YPPX4Y3.js} +1 -1
  11. package/dist/cdn/{RT6SXACX.js → 4Z7OQ6QY.js} +1 -1
  12. package/dist/cdn/{D7LRCAK4.js → 53GR4QVG.js} +1 -1
  13. package/dist/cdn/57DQMVPP.js +2 -0
  14. package/dist/cdn/{REJN2DGR.js → 5CBXYHFU.js} +1 -1
  15. package/dist/cdn/{62B2UH5G.js → 64QA6IBU.js} +1 -1
  16. package/dist/cdn/66MA5EIA.js +2 -0
  17. package/dist/cdn/{2JBQEODK.js → 6RAOSMME.js} +1 -1
  18. package/dist/cdn/{RXUBABBP.js → 6VTAWA6R.js} +1 -1
  19. package/dist/cdn/74XEOQEV.js +2 -0
  20. package/dist/cdn/{YL6IU62Q.js → 765N2BRQ.js} +1 -1
  21. package/dist/cdn/{TMG43PBB.js → AARKDW3L.js} +1 -1
  22. package/dist/cdn/{DIKRXF22.js → BFYTNFAM.js} +1 -1
  23. package/dist/cdn/{QU2JYXVL.js → BKU43GE5.js} +1 -1
  24. package/dist/cdn/{KIKEE2KY.js → C3W4HTWD.js} +1 -1
  25. package/dist/cdn/CKEGCEEU.js +2 -0
  26. package/dist/cdn/{V5YXPHYD.js → CWGXNX3W.js} +1 -1
  27. package/dist/cdn/{6ZBAKXW2.js → DITALHT7.js} +1 -1
  28. package/dist/cdn/{SG7Z5VLB.js → EX5JJTWQ.js} +1 -1
  29. package/dist/cdn/{LNWWUPFK.js → FD7SPNGP.js} +1 -1
  30. package/dist/cdn/{VAQBQ6X6.js → FZUEX6YH.js} +1 -1
  31. package/dist/cdn/{F3CDDDVJ.js → GTD6FUPM.js} +1 -1
  32. package/dist/cdn/{MFJVE4UZ.js → HOWXDT3E.js} +1 -1
  33. package/dist/cdn/HT4JMB5R.js +2 -0
  34. package/dist/cdn/{ERTVYVBA.js → HTTYI276.js} +1 -1
  35. package/dist/cdn/{YF77GTM6.js → HXDTSREX.js} +1 -1
  36. package/dist/cdn/I7NJ6E6I.js +2 -0
  37. package/dist/cdn/{HLRWGHMU.js → IJLJOGU3.js} +1 -1
  38. package/dist/cdn/J4M77DLV.js +2 -0
  39. package/dist/cdn/JI63K67U.js +2 -0
  40. package/dist/cdn/{LD5ZMPBH.js → JIWLTMFC.js} +1 -1
  41. package/dist/cdn/{6BMWSGLA.js → K3ROLJNC.js} +1 -1
  42. package/dist/cdn/{WDMKBY5P.js → K4LOZYJF.js} +1 -1
  43. package/dist/cdn/{HR2EL446.js → KQEU5AFO.js} +1 -1
  44. package/dist/cdn/{XBHHSHDT.js → LU7EPIPR.js} +1 -1
  45. package/dist/cdn/{7NQY5QJK.js → M6AFYDDU.js} +1 -1
  46. package/dist/cdn/{OQGUCK3G.js → MEBV5YAO.js} +1 -1
  47. package/dist/cdn/{TAREB43U.js → MOJGAOYF.js} +1 -1
  48. package/dist/cdn/{V2OG75CK.js → MTY2ZUR2.js} +1 -1
  49. package/dist/cdn/{EL6F7I65.js → NKRXJF72.js} +1 -1
  50. package/dist/cdn/{SKVSGN5R.js → O6KBOBTA.js} +1 -1
  51. package/dist/cdn/{OV5O7YP4.js → OUZPGGZR.js} +1 -1
  52. package/dist/cdn/{5557G7H7.js → P2XPGJIH.js} +1 -1
  53. package/dist/cdn/{YJS5PGLO.js → P5WD6JVL.js} +1 -1
  54. package/dist/cdn/{RYGAKVAH.js → PGVE7V53.js} +1 -1
  55. package/dist/cdn/PLGWH6LA.js +2 -0
  56. package/dist/cdn/PO54NFLO.js +2 -0
  57. package/dist/cdn/{NRWS6VHC.js → PPHEHA5I.js} +3 -3
  58. package/dist/cdn/{QVMZCD3A.js → PS5BTYGD.js} +1 -1
  59. package/dist/cdn/{UGRFT75G.js → Q53MAFDQ.js} +1 -1
  60. package/dist/cdn/{UET4LRH4.js → QQ6MQPCH.js} +1 -1
  61. package/dist/cdn/{ZFWPZG2R.js → QS53VF2B.js} +1 -1
  62. package/dist/cdn/{2XTCMELJ.js → RAAM3NQL.js} +1 -1
  63. package/dist/cdn/{AQBDDI5G.js → RVZXDXUC.js} +1 -1
  64. package/dist/cdn/{OYBNVHDN.js → S62RRECO.js} +1 -1
  65. package/dist/cdn/{V3FR444R.js → S6R4ZQPM.js} +1 -1
  66. package/dist/cdn/{FQYC25GN.js → SFNAWLR5.js} +1 -1
  67. package/dist/cdn/{KDZZI4N6.js → SOLQD7DU.js} +1 -1
  68. package/dist/cdn/{APPG4XOM.js → ST7YCKG6.js} +1 -1
  69. package/dist/cdn/{Q27BEUYD.js → TA456NXC.js} +1 -1
  70. package/dist/cdn/{ADZAKBOJ.js → TFGNQADN.js} +1 -1
  71. package/dist/cdn/{CLE3KBXG.js → UANMZWU3.js} +1 -1
  72. package/dist/cdn/UC42OQDP.js +2 -0
  73. package/dist/cdn/{RY67AWPW.js → UCE5G5TL.js} +1 -1
  74. package/dist/cdn/{7EOHRU5A.js → UQSYMUOF.js} +1 -1
  75. package/dist/cdn/URZI7SU4.js +2 -0
  76. package/dist/cdn/{WXD774JG.js → V4XGNCNI.js} +1 -1
  77. package/dist/cdn/{CWSEBETE.js → VAFMKDDD.js} +1 -1
  78. package/dist/cdn/VSNBZIZ4.js +2 -0
  79. package/dist/cdn/{O574EOBL.js → X4E3B7EQ.js} +1 -1
  80. package/dist/cdn/{W2S5YVKM.js → XGRVBCMF.js} +1 -1
  81. package/dist/cdn/XRF3NMPE.js +2 -0
  82. package/dist/cdn/XYH7L6WW.js +2 -0
  83. package/dist/cdn/XYZFL54V.js +2 -0
  84. package/dist/cdn/{23X56P4K.js → Y2EJ24EM.js} +1 -1
  85. package/dist/cdn/index.js +1 -1
  86. package/dist/components/arcgis-portal-account-switcher/customElement.js +1 -1
  87. package/dist/components/arcgis-portal-navigation/index.js +1 -1
  88. package/dist/docs/api.json +1 -1
  89. package/dist/docs/docs.json +1 -1
  90. package/dist/docs/web-types.json +1 -1
  91. package/package.json +7 -7
  92. package/dist/cdn/24PB4CMZ.js +0 -2
  93. package/dist/cdn/7KIHTNFO.js +0 -2
  94. package/dist/cdn/BMRZX2ZQ.js +0 -2
  95. package/dist/cdn/BTCYM6R7.js +0 -2
  96. package/dist/cdn/FQOOFBPI.js +0 -2
  97. package/dist/cdn/I5YIPEN4.js +0 -2
  98. package/dist/cdn/IFN5ZRZD.js +0 -2
  99. package/dist/cdn/LM65VWTC.js +0 -2
  100. package/dist/cdn/MZB7H76S.js +0 -2
  101. package/dist/cdn/MZRAB4IK.js +0 -2
  102. package/dist/cdn/NWCLIMJO.js +0 -2
  103. package/dist/cdn/PRIG3TBV.js +0 -2
  104. package/dist/cdn/RSOQTTTO.js +0 -2
  105. package/dist/cdn/UBETRFSP.js +0 -2
  106. package/dist/cdn/UYI35JX3.js +0 -2
  107. package/dist/cdn/V77BFG3A.js +0 -2
  108. package/dist/cdn/Y524SHM6.js +0 -2
  109. package/dist/cdn/Z5JADXDQ.js +0 -2
  110. /package/dist/cdn/{R74ZHFA6.js → JMA56SOB.js} +0 -0
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import a from"./KLQ5GKNI.js";import"./WNDPRHBO.js";import"./QS3GXAIH.js";import{c as F}from"./TNNIKT2R.js";import{a as O}from"./QU2JYXVL.js";import"./RT6SXACX.js";import"./6BMWSGLA.js";import{L as _,R as q,h as f,j as y,w as h}from"./CWSEBETE.js";import"./R74ZHFA6.js";import"./UZLQALHY.js";export default $arcgis.t(([C,L,T,{b:g}])=>{var w=f`:host{background-color:var(--calcite-color-foreground-1)}.scrim-container{position:relative}.base-fields-control{margin-inline-end:.75rem}.added{display:inline-flex;gap:.5rem;flex-shrink:0;white-space:nowrap}.added calcite-icon{color:var(--calcite-color-status-success)}.add-fields-button{margin:.75rem 0}calcite-block{border-bottom:0}calcite-list-item:last-child:after{display:block;margin-inline-start:var(--calcite-spacing-md);border-block-end:1px solid var(--calcite-list-border-color, var(--calcite-color-border-3));content:""}`;async function P({item:t,layers:e}){let{url:a}=t,l=new Map;if(!a)return{result:l};try{let s=(await T(a,{cacheBust:!0,query:{f:"json"},responseType:"json"})).data;if(s.fields){let n=e?.[0];return e?.length===1&&n?.layerId!=null&&l.set(n.layerId,s.fields),{result:l}}if(!s.layers?.length)return{result:l};let i=a.replace(/\/$/u,"");return await Promise.all(s.layers.map(async({id:n})=>{let d=(await T(`${i}/${n}`,{cacheBust:!0,query:{f:"json"},responseType:"json"})).data;l.set(n,d.fields??[])})),{result:l}}catch(s){return console.error("Error getting layer fields:",s),{error:{code:"unhandledError"}}}}var I=t=>{let{url:e}=t;return e?e.replace("/rest/services","/rest/admin/services").replace(/\/$/u,""):null};async function z({fields:t,item:e,portal:a,layerId:l}){let s=I(e);if(!s)return{error:{code:"unhandledError",message:"A feature service URL is required."}};try{let i=await g({url:`${s}/${l!=null?`${l}/`:""}addToDefinition`,portal:a,method:"post",params:{addToDefinition:JSON.stringify({fields:t})}});return i.success===!1||i.error?{error:{code:"unhandledError",message:i.error?.message}}:{result:i}}catch(i){return console.error("Error adding fields to the feature service definition:",i),{error:{code:"unhandledError"}}}}async function A({fields:t,item:e,portal:a,layerId:l}){let s=I(e);if(!s)return{error:{code:"unhandledError",message:"A feature service URL is required."}};try{let i=await g({url:`${s}/${l!=null?`${l}/`:""}updateDefinition`,portal:a,method:"post",params:{updateDefinition:JSON.stringify({fields:t})}});return i.success===!1||i.error?{error:{code:"unhandledError",message:i.error?.message??"Failed to update the feature service definition."}}:{result:i}}catch(i){return console.error("Error updating the feature service definition:",i),{error:{code:"unhandledError"}}}}async function x(t){let{url:e}=t;if(!e)return{error:{code:"unhandledError"}};try{return{result:(await T(e,{query:{f:"json"}})).data}}catch(a){return console.error("Error getting service info:",a),{error:{code:"unhandledError"}}}}var G=(t,e)=>{let a=t.domain??null,l=e.domain??null;return a===null||l===null?a===l:a.type!==l.type?!1:a.type==="codedValue"&&l.type==="codedValue"?a.codedValues.length===l.codedValues.length&&a.codedValues.every(({code:s,name:i},n)=>s===l.codedValues[n]?.code&&i===l.codedValues[n]?.name):a.type==="range"&&l.type==="range"?a.range[0]===l.range[0]&&a.range[1]===l.range[1]:!0},R=(t,e)=>{let a=new Map(e.map(i=>[i.name,i])),l=[],s=[];for(let i of t){let n=a.get(i.name);n?G(i,n)||s.push({name:i.name,domain:i.domain}):l.push(i)}return{missingFields:l,modifiedFields:s}},E=t=>{switch(t){case"esriGeometryPolyline":case"esriGeometryPolygon":return[...M];case"esriGeometryPoint":return[...N];default:return[]}},V=t=>t==="esriGeometryPoint"?[...k]:[],D=t=>t==="esriGeometryPoint"?[...$]:[],M=[{name:"esrignss_avg_h_rms",type:"esriFieldTypeDouble",alias:"Average horizontal accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_avg_v_rms",type:"esriFieldTypeDouble",alias:"Average vertical accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_worst_h_rms",type:"esriFieldTypeDouble",alias:"Worst horizontal accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_worst_v_rms",type:"esriFieldTypeDouble",alias:"Worst vertical accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_worst_fixtype",type:"esriFieldTypeSmallInteger",alias:"Worst fix type",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:{type:"codedValue",name:"ESRI_FIX_TYPE_DOMAIN",codedValues:[{name:"NoFix",code:0},{name:"GPS",code:1},{name:"DifferentialGPS",code:2},{name:"PrecisePositioningService",code:3},{name:"RTKFixed",code:4},{name:"RTKFloat",code:5}]},defaultValue:null},{name:"esrignss_manual_locations",type:"esriFieldTypeInteger",alias:"Number of manual locations",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null}],N=[{name:"esrignss_speed",type:"esriFieldTypeDouble",alias:"Speed (km/h)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_direction",type:"esriFieldTypeDouble",alias:"Direction of travel (\xB0)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrisnsr_azimuth",type:"esriFieldTypeDouble",alias:"Compass reading (\xB0)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_positionsourcetype",type:"esriFieldTypeInteger",alias:"Position source type",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:{type:"codedValue",name:"ESRI_POSITIONSOURCETYPE_DOMAIN",codedValues:[{name:"Unknown",code:0},{name:"User defined",code:1},{name:"Integrated (System) Location Provider",code:2},{name:"External GNSS Receiver",code:3},{name:"Network Location Provider",code:4},{name:"Snapped",code:5}]},defaultValue:null},{name:"esrignss_receiver",type:"esriFieldTypeString",alias:"Receiver name",sqlType:"sqlTypeOther",length:50,nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_h_rms",type:"esriFieldTypeDouble",alias:"Horizontal accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_v_rms",type:"esriFieldTypeDouble",alias:"Vertical accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_latitude",type:"esriFieldTypeDouble",alias:"Latitude",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_longitude",type:"esriFieldTypeDouble",alias:"Longitude",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_altitude",type:"esriFieldTypeDouble",alias:"Ellipsoidal height (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_pdop",type:"esriFieldTypeDouble",alias:"PDOP",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_hdop",type:"esriFieldTypeDouble",alias:"HDOP",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_vdop",type:"esriFieldTypeDouble",alias:"VDOP",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_fixtype",type:"esriFieldTypeSmallInteger",alias:"Fix type",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:{type:"codedValue",name:"ESRI_FIX_TYPE_DOMAIN",codedValues:[{name:"NoFix",code:0},{name:"GPS",code:1},{name:"DifferentialGPS",code:2},{name:"PrecisePositioningService",code:3},{name:"RTKFixed",code:4},{name:"RTKFloat",code:5}]},defaultValue:null},{name:"esrignss_correctionage",type:"esriFieldTypeDouble",alias:"Correction age",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_stationid",type:"esriFieldTypeSmallInteger",alias:"Station ID",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_numsats",type:"esriFieldTypeSmallInteger",alias:"Number of satellites",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:{type:"range",name:"ESRI_NUM_SATS_DOMAIN",range:[0,99]},defaultValue:null},{name:"esrignss_fixdatetime",type:"esriFieldTypeDate",alias:"Fix time",sqlType:"sqlTypeOther",length:8,nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_avg_h_rms",type:"esriFieldTypeDouble",alias:"Average horizontal accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_avg_v_rms",type:"esriFieldTypeDouble",alias:"Average vertical accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_avg_positions",type:"esriFieldTypeInteger",alias:"Averaged positions",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_h_stddev",type:"esriFieldTypeDouble",alias:"Standard deviation (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_correction_source_name",type:"esriFieldTypeString",alias:"Correction source name",sqlType:"sqlTypeOther",length:100,nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_correction_source_type",type:"esriFieldTypeString",alias:"Correction source type",sqlType:"sqlTypeOther",length:25,nullable:!0,editable:!0,domain:{type:"codedValue",name:"esrignss_correction_source_domain",codedValues:[{name:"Unknown",code:"Unknown"},{name:"Direct IP",code:"Direct IP"},{name:"NTRIP",code:"NTRIP"},{name:"PPP",code:"PPP"},{name:"Radio",code:"Radio"},{name:"SBAS",code:"SBAS"}]},defaultValue:null},{name:"esrignss_custom_attributes",type:"esriFieldTypeString",alias:"GNSS custom attributes",sqlType:"sqlTypeOther",length:2e3,nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_h_95_status",type:"esriFieldTypeSmallInteger",alias:"95% accuracy applied",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:{type:"codedValue",name:"esrignss_yesno_domain",codedValues:[{name:"No",code:0},{name:"Yes",code:1}]},defaultValue:null},{name:"esrignss_ntrip_mount_point",type:"esriFieldTypeString",alias:"NTRIP mount point",sqlType:"sqlTypeOther",length:100,nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_antenna_height",type:"esriFieldTypeDouble",alias:"GNSS antenna height (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_orthometric_height",type:"esriFieldTypeDouble",alias:"Orthometric height (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_profile_has_hor_xform",type:"esriFieldTypeSmallInteger",alias:"Location profile horizontal datum transformation applied",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:{type:"codedValue",name:"esrignss_yesno_domain",codedValues:[{name:"No",code:0},{name:"Yes",code:1}]},defaultValue:null},{name:"esrignss_profile_hor_xform",type:"esriFieldTypeString",alias:"Location profile horizontal datum transformation",sqlType:"sqlTypeOther",length:255,nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_receiver_gcs",type:"esriFieldTypeString",alias:"Geographic coordinate system",sqlType:"sqlTypeOther",length:60,nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_receiver_gcs_wkid",type:"esriFieldTypeInteger",alias:"Geographic coordinate system WKID",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_receiver_geoid",type:"esriFieldTypeString",alias:"Receiver geoid model",sqlType:"sqlTypeOther",length:60,nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_receiver_ref_epoch",type:"esriFieldTypeDouble",alias:"Reference epoch",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null}],k=[{name:"esrisnsr_tilt_azimuth_accuracy",type:"esriFieldTypeDouble",alias:"Tilt azimuth accuracy (\xB0)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrisnsr_tilt_azimuth",type:"esriFieldTypeDouble",alias:"Tilt azimuth (\xB0)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrisnsr_tilt_angle_accuracy",type:"esriFieldTypeDouble",alias:"Tilt angle accuracy (\xB0)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrisnsr_tilt_angle",type:"esriFieldTypeDouble",alias:"Tilt angle (\xB0)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_tilt_compensated",type:"esriFieldTypeSmallInteger",alias:"Tilt compensated",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:{type:"codedValue",name:"esrignss_yesno_domain",codedValues:[{name:"No",code:0},{name:"Yes",code:1}]},defaultValue:null}],$=[{name:"esrignss_cp1_latitude",type:"esriFieldTypeDouble",alias:"CP1 latitude",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_longitude",type:"esriFieldTypeDouble",alias:"CP1 longitude",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_altitude",type:"esriFieldTypeDouble",alias:"CP1 ellipsoidal height (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_h_rms",type:"esriFieldTypeDouble",alias:"CP1 horizontal accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_v_rms",type:"esriFieldTypeDouble",alias:"CP1 vertical accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_fixdatetime",type:"esriFieldTypeDate",alias:"CP1 fix time",sqlType:"sqlTypeOther",length:8,nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_fixtype",type:"esriFieldTypeSmallInteger",alias:"CP1 fix type",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:{type:"codedValue",name:"ESRI_FIX_TYPE_DOMAIN",codedValues:[{name:"Fix not valid",code:0},{name:"GPS",code:1},{name:"Differential GPS",code:2},{name:"RTK Fixed",code:4},{name:"RTK Float",code:5}]},defaultValue:null},{name:"esrignss_cp1_corr_age",type:"esriFieldTypeDouble",alias:"CP1 correction age",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_stationid",type:"esriFieldTypeSmallInteger",alias:"CP1 station ID",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_numsats",type:"esriFieldTypeSmallInteger",alias:"CP1 number of satellites",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_pdop",type:"esriFieldTypeDouble",alias:"CP1 PDOP",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_hdop",type:"esriFieldTypeDouble",alias:"CP1 HDOP",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_vdop",type:"esriFieldTypeDouble",alias:"CP1 VDOP",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_avg_h_rms",type:"esriFieldTypeDouble",alias:"CP1 average horizontal accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_avg_v_rms",type:"esriFieldTypeDouble",alias:"CP1 average vertical accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_avg_positions",type:"esriFieldTypeInteger",alias:"CP1 averaged positions",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_h_stddev",type:"esriFieldTypeDouble",alias:"CP1 standard deviation (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrisnsr_cp1_slope_dist",type:"esriFieldTypeDouble",alias:"CP1 laser slope distance (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrisnsr_cp1_inclination",type:"esriFieldTypeDouble",alias:"CP1 laser inclination (\xB0)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrisnsr_cp1_azimuth",type:"esriFieldTypeDouble",alias:"CP1 laser azimuth (\xB0)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_latitude",type:"esriFieldTypeDouble",alias:"CP2 latitude",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_longitude",type:"esriFieldTypeDouble",alias:"CP2 longitude",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_altitude",type:"esriFieldTypeDouble",alias:"CP2 ellipsoidal height (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_h_rms",type:"esriFieldTypeDouble",alias:"CP2 horizontal accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_v_rms",type:"esriFieldTypeDouble",alias:"CP2 vertical accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_fixdatetime",type:"esriFieldTypeDate",alias:"CP2 fix time",sqlType:"sqlTypeOther",length:8,nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_fixtype",type:"esriFieldTypeSmallInteger",alias:"CP2 fix type",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:{type:"codedValue",name:"ESRI_FIX_TYPE_DOMAIN",codedValues:[{name:"Fix not valid",code:0},{name:"GPS",code:1},{name:"Differential GPS",code:2},{name:"RTK Fixed",code:4},{name:"RTK Float",code:5}]},defaultValue:null},{name:"esrignss_cp2_corr_age",type:"esriFieldTypeDouble",alias:"CP2 correction age",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_stationid",type:"esriFieldTypeSmallInteger",alias:"CP2 station ID",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_numsats",type:"esriFieldTypeSmallInteger",alias:"CP2 number of satellites",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_pdop",type:"esriFieldTypeDouble",alias:"CP2 PDOP",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_hdop",type:"esriFieldTypeDouble",alias:"CP2 HDOP",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_vdop",type:"esriFieldTypeDouble",alias:"CP2 VDOP",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_avg_h_rms",type:"esriFieldTypeDouble",alias:"CP2 average horizontal accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_avg_v_rms",type:"esriFieldTypeDouble",alias:"CP2 average vertical accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_avg_positions",type:"esriFieldTypeInteger",alias:"CP2 averaged positions",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_h_stddev",type:"esriFieldTypeDouble",alias:"CP2 standard deviation (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrisnsr_cp2_slope_dist",type:"esriFieldTypeDouble",alias:"CP2 laser slope distance (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrisnsr_cp2_inclination",type:"esriFieldTypeDouble",alias:"CP2 laser inclination (\xB0)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrisnsr_cp2_azimuth",type:"esriFieldTypeDouble",alias:"CP2 laser azimuth (\xB0)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrisnsr_offset_method",type:"esriFieldTypeString",alias:"Offset method",sqlType:"sqlTypeOther",length:5e3,nullable:!0,editable:!0,domain:{type:"codedValue",name:"ESRI_OFFSET_METHOD_DOMAIN",codedValues:[{name:"Azimuth-Azimuth",code:"azimuth-azimuth"},{name:"Distance-Angle",code:"distance-angle"},{name:"Distance-Azimuth",code:"distance-azimuth"},{name:"Distance-Distance",code:"distance-distance"},{name:"Azimuth-Azimuth-Backsight",code:"azimuth-azimuth-backsight"},{name:"Distance-Azimuth-Backsight",code:"distance-azimuth-backsight"},{name:"Distance-Distance-Backsight",code:"distance-distance-backsight"},{name:"User-defined",code:"user-defined"}]},defaultValue:null},{name:"esrisnsr_offset_device",type:"esriFieldTypeString",alias:"Rangefinder name",sqlType:"sqlTypeOther",length:5e3,nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrisnsr_offset_laser_height",type:"esriFieldTypeDouble",alias:"Rangefinder height (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrisnsr_offset_laser_target_ht",type:"esriFieldTypeDouble",alias:"Laser target height (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrisnsr_offset_mag_var",type:"esriFieldTypeDouble",alias:"Rangefinder magnetic variation (\xB0)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null}];function B(t){if(t.geometryType==="polyline"||t.geometryType==="polygon"){let e=t.capabilities;return e?.data?.supportsAttachment&&e?.operations?.supportsQueryAttachments}return!0}var U=t=>t.every(B),K=["point","polyline","polygon"],S=t=>t?.type==="Feature Service",b=class extends _{constructor(){super(...arguments),this.messages=O({blocking:!0}),this.initCount=0,this.supportsAttachments=!1,this.layersLoaded=!1,this.pointLayers=[],this.lineOrPolygonLayers=[],this.loadedItem=null,this.gpsFieldFixesBySet=null,this.addFieldsDisabled=!0,this.initializing=!0,this.hasLineOrPolygonLayer=!1,this.hasPointFeatureLayer=!1,this.addingGPSFieldMetadata=[],this.item=null,this.itemId=null,this.messageOverrides={},this.arcgisGPSMetadataFieldsAdded=h(),this.arcgisReadOnlyMode=h()}static{this.properties={loadedItem:16,gpsFieldFixesBySet:16,addFieldsDisabled:16,initializing:16,hasLineOrPolygonLayer:16,hasPointFeatureLayer:16,addingGPSFieldMetadata:16,item:0,itemId:1,portal:0,messageOverrides:0}}static{this.styles=w}connectedCallback(){super.connectedCallback(),this.hasUpdated&&this.initItem()}willUpdate(e){(e.has("item")||e.has("itemId"))&&this.initItem()}async initItem({showLoading:e=!0}={}){let a=++this.initCount;if(!this.item&&!this.itemId){this.resetItemState(),this.initializing=!1;return}e&&(this.resetItemState(),this.initializing=!0);let{item:l,itemId:s,portal:i}=this,n=l?await l.load():await new L({id:s,portal:i}).load();if(!this.isCurrentInitialization(a))return;if(!S(n)){this.resetItemState(),this.initializing=!1;return}this.loadedItem=n;let d=!e&&this.layersLoaded?[...this.pointLayers,...this.lineOrPolygonLayers]:await this.getFeatureLayers(n),{result:m}=await x(n);if(!this.isCurrentInitialization(a))return;this.layersLoaded=!0,this.pointLayers=d.filter(o=>o.geometryType==="point"),this.lineOrPolygonLayers=d.filter(o=>o.geometryType==="polyline"||o.geometryType==="polygon"),this.hasLineOrPolygonLayer=d.some(o=>o.geometryType==="polyline"||o.geometryType==="polygon"),this.hasPointFeatureLayer=d.some(o=>o.geometryType==="point");let{result:u,error:c}=d.length>0?await P({item:n,layers:d}):{};if(!this.isCurrentInitialization(a))return;if(c){this.resetItemState(),this.initializing=!1;return}let r=u??new Map;this.gpsFieldFixesBySet={base:this.analyzeFieldSet([...this.pointLayers,...this.lineOrPolygonLayers],r,"base"),gnss:this.analyzeFieldSet(this.pointLayers,r,"gnss"),rangefinder:this.analyzeFieldSet(this.pointLayers,r,"rangefinder")},this.supportsAttachments=U(d);let p=m?.sourceSchemaChangesAllowed!==!1;this.addFieldsDisabled=!this.supportsAttachments||!p,this.initializing=!1}isCurrentInitialization(e){return e===this.initCount}resetItemState(){this.loadedItem=null,this.layersLoaded=!1,this.pointLayers=[],this.lineOrPolygonLayers=[],this.gpsFieldFixesBySet=null,this.addFieldsDisabled=!0,this.hasLineOrPolygonLayer=!1,this.hasPointFeatureLayer=!1}async getFeatureLayers(e){let a=await C.fromPortalItem({portalItem:e});return await a.load(),"layers"in a?(await Promise.all(a.layers.map(async l=>(await l.load(),this.isSupportedFeatureLayer(l)?l:null)))).filter(l=>!!l):this.isSupportedFeatureLayer(a)?[a]:[]}isSupportedFeatureLayer(e){return e.type==="feature"&&K.some(a=>a===e.geometryType)}getCompatibleEsriGeometryType(e){switch(e.geometryType){case"point":return"esriGeometryPoint";case"polyline":return"esriGeometryPolyline";case"polygon":return"esriGeometryPolygon";default:return null}}analyzeFieldSet(e,a,l){let s=[];for(let i of e){if(i.layerId==null)continue;let n=a.get(i.layerId)??[],d=this.getCompatibleEsriGeometryType(i),m=d?l==="base"?E(d):l==="gnss"?V(d):D(d):[],u=R(m,n);(u.missingFields.length>0||u.modifiedFields.length>0)&&s.push({layerId:i.layerId,fieldsToAdd:u.missingFields,domainsToUpdate:u.modifiedFields})}return s}hasFieldChanges(e){return(this.gpsFieldFixesBySet?.[e].length??0)>0}isLoading(e){return this.addingGPSFieldMetadata.includes(e)}async addFields(e){let a=this.portal??this.loadedItem?.portal,l=this.loadedItem,s=this.gpsFieldFixesBySet;if(!a||!l||!s)return;if(a.isReadOnly){this.arcgisReadOnlyMode.emit();return}this.addingGPSFieldMetadata=[...this.addingGPSFieldMetadata,e];let i=[...this.pointLayers,...this.lineOrPolygonLayers];try{let n=s[e],d=(await Promise.all(n.filter(({fieldsToAdd:r})=>r.length>0).map(async({fieldsToAdd:r,layerId:p})=>await z({fields:r,item:l,layerId:p,portal:a})))).every(({error:r})=>!r),m=d?await Promise.all(n.filter(({domainsToUpdate:r})=>r.length>0).map(async({domainsToUpdate:r,layerId:p})=>await A({fields:r,item:l,layerId:p,portal:a}))):[],u=d&&m.every(({error:r})=>!r);if(!u||this.loadedItem!==l)return;let c;if(await F(async()=>{if(this.loadedItem!==l)return!0;let{result:r,error:p}=await P({item:l,layers:i});if(p||this.loadedItem!==l)return!0;if(!r)return!1;let o=e==="base"?i:i.filter(v=>v.geometryType==="point");return this.analyzeFieldSet(o,r,e).length>0?!1:(c=r,!0)},10)||console.warn("Fields were not verified on the service.",{itemId:l.id,fieldSet:e}),!c||this.loadedItem!==l)return;await this.initItem({showLoading:!1}),d&&u&&this.gpsFieldFixesBySet&&!this.hasFieldChanges(e)&&this.arcgisGPSMetadataFieldsAdded.emit(e)}finally{this.addingGPSFieldMetadata=this.addingGPSFieldMetadata.filter(n=>n!==e)}}canShowAddGPSMetadata(){let e=this.loadedItem??this.item;return!!e&&S(e)}showAdvancedFields(){let e=this.gpsFieldFixesBySet;return!this.hasPointFeatureLayer||!e?!1:this.hasFieldChanges("base")?this.pointLayers.some(a=>a.layerId==null?!1:["gnss","rangefinder"].some(l=>{let s=l==="gnss"?V("esriGeometryPoint"):D("esriGeometryPoint");return(e[l].find(({layerId:i})=>i===a.layerId)?.fieldsToAdd??[]).length<s.length})):!0}renderAddFieldsControl(e,a=!1){let l=this.gpsFieldFixesBySet;if(!a&&l&&!this.hasFieldChanges(e))return y`<span slot=actions-end class="added"><calcite-icon icon=check-circle scale=s aria-hidden></calcite-icon>${this.messages.added}</span>`;let s=this.isLoading(e);return y`<calcite-button slot=actions-end class="add-fields-button" appearance=outline-fill .disabled=${a||!l||s||this.addFieldsDisabled} .loading=${s} @click=${async()=>await this.addFields(e)}>${s?this.messages.addingFields:this.messages.addFields}</calcite-button>`}render(){return this.canShowAddGPSMetadata()?y`<div class="scrim-container"><calcite-block scale=m expanded>${this.initializing&&y`<calcite-scrim loading></calcite-scrim>`||""}<calcite-list .label=${this.messages.gpsOptions} selection-mode=none><calcite-list-item .label=${this.messages.accordionHeading}>${this.renderAddFieldsControl("base")}</calcite-list-item>${this.showAdvancedFields()&&y`<calcite-list-item .label=${this.messages.gnssReceiverFields}>${this.renderAddFieldsControl("gnss")}</calcite-list-item><calcite-list-item .label=${this.messages.laserRangefinderFields}>${this.renderAddFieldsControl("rangefinder")}</calcite-list-item>`||""}</calcite-list></calcite-block></div>`:null}};q("arcgis-portal-add-gps-metadata",b);return b},"layers/Layer","portal/PortalItem","request",a)
2
+ import a from"./KLQ5GKNI.js";import"./WNDPRHBO.js";import"./QS3GXAIH.js";import{c as F}from"./TNNIKT2R.js";import{a as O}from"./BKU43GE5.js";import"./4Z7OQ6QY.js";import"./K3ROLJNC.js";import{L as _,R as q,h as f,j as y,w as h}from"./VAFMKDDD.js";import"./JMA56SOB.js";import"./UZLQALHY.js";export default $arcgis.t(([C,L,T,{b:g}])=>{var w=f`:host{background-color:var(--calcite-color-foreground-1)}.scrim-container{position:relative}.base-fields-control{margin-inline-end:.75rem}.added{display:inline-flex;gap:.5rem;flex-shrink:0;white-space:nowrap}.added calcite-icon{color:var(--calcite-color-status-success)}.add-fields-button{margin:.75rem 0}calcite-block{border-bottom:0}calcite-list-item:last-child:after{display:block;margin-inline-start:var(--calcite-spacing-md);border-block-end:1px solid var(--calcite-list-border-color, var(--calcite-color-border-3));content:""}`;async function P({item:t,layers:e}){let{url:a}=t,l=new Map;if(!a)return{result:l};try{let s=(await T(a,{cacheBust:!0,query:{f:"json"},responseType:"json"})).data;if(s.fields){let n=e?.[0];return e?.length===1&&n?.layerId!=null&&l.set(n.layerId,s.fields),{result:l}}if(!s.layers?.length)return{result:l};let i=a.replace(/\/$/u,"");return await Promise.all(s.layers.map(async({id:n})=>{let d=(await T(`${i}/${n}`,{cacheBust:!0,query:{f:"json"},responseType:"json"})).data;l.set(n,d.fields??[])})),{result:l}}catch(s){return console.error("Error getting layer fields:",s),{error:{code:"unhandledError"}}}}var I=t=>{let{url:e}=t;return e?e.replace("/rest/services","/rest/admin/services").replace(/\/$/u,""):null};async function z({fields:t,item:e,portal:a,layerId:l}){let s=I(e);if(!s)return{error:{code:"unhandledError",message:"A feature service URL is required."}};try{let i=await g({url:`${s}/${l!=null?`${l}/`:""}addToDefinition`,portal:a,method:"post",params:{addToDefinition:JSON.stringify({fields:t})}});return i.success===!1||i.error?{error:{code:"unhandledError",message:i.error?.message}}:{result:i}}catch(i){return console.error("Error adding fields to the feature service definition:",i),{error:{code:"unhandledError"}}}}async function A({fields:t,item:e,portal:a,layerId:l}){let s=I(e);if(!s)return{error:{code:"unhandledError",message:"A feature service URL is required."}};try{let i=await g({url:`${s}/${l!=null?`${l}/`:""}updateDefinition`,portal:a,method:"post",params:{updateDefinition:JSON.stringify({fields:t})}});return i.success===!1||i.error?{error:{code:"unhandledError",message:i.error?.message??"Failed to update the feature service definition."}}:{result:i}}catch(i){return console.error("Error updating the feature service definition:",i),{error:{code:"unhandledError"}}}}async function x(t){let{url:e}=t;if(!e)return{error:{code:"unhandledError"}};try{return{result:(await T(e,{query:{f:"json"}})).data}}catch(a){return console.error("Error getting service info:",a),{error:{code:"unhandledError"}}}}var G=(t,e)=>{let a=t.domain??null,l=e.domain??null;return a===null||l===null?a===l:a.type!==l.type?!1:a.type==="codedValue"&&l.type==="codedValue"?a.codedValues.length===l.codedValues.length&&a.codedValues.every(({code:s,name:i},n)=>s===l.codedValues[n]?.code&&i===l.codedValues[n]?.name):a.type==="range"&&l.type==="range"?a.range[0]===l.range[0]&&a.range[1]===l.range[1]:!0},R=(t,e)=>{let a=new Map(e.map(i=>[i.name,i])),l=[],s=[];for(let i of t){let n=a.get(i.name);n?G(i,n)||s.push({name:i.name,domain:i.domain}):l.push(i)}return{missingFields:l,modifiedFields:s}},E=t=>{switch(t){case"esriGeometryPolyline":case"esriGeometryPolygon":return[...M];case"esriGeometryPoint":return[...N];default:return[]}},V=t=>t==="esriGeometryPoint"?[...k]:[],D=t=>t==="esriGeometryPoint"?[...$]:[],M=[{name:"esrignss_avg_h_rms",type:"esriFieldTypeDouble",alias:"Average horizontal accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_avg_v_rms",type:"esriFieldTypeDouble",alias:"Average vertical accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_worst_h_rms",type:"esriFieldTypeDouble",alias:"Worst horizontal accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_worst_v_rms",type:"esriFieldTypeDouble",alias:"Worst vertical accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_worst_fixtype",type:"esriFieldTypeSmallInteger",alias:"Worst fix type",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:{type:"codedValue",name:"ESRI_FIX_TYPE_DOMAIN",codedValues:[{name:"NoFix",code:0},{name:"GPS",code:1},{name:"DifferentialGPS",code:2},{name:"PrecisePositioningService",code:3},{name:"RTKFixed",code:4},{name:"RTKFloat",code:5}]},defaultValue:null},{name:"esrignss_manual_locations",type:"esriFieldTypeInteger",alias:"Number of manual locations",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null}],N=[{name:"esrignss_speed",type:"esriFieldTypeDouble",alias:"Speed (km/h)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_direction",type:"esriFieldTypeDouble",alias:"Direction of travel (\xB0)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrisnsr_azimuth",type:"esriFieldTypeDouble",alias:"Compass reading (\xB0)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_positionsourcetype",type:"esriFieldTypeInteger",alias:"Position source type",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:{type:"codedValue",name:"ESRI_POSITIONSOURCETYPE_DOMAIN",codedValues:[{name:"Unknown",code:0},{name:"User defined",code:1},{name:"Integrated (System) Location Provider",code:2},{name:"External GNSS Receiver",code:3},{name:"Network Location Provider",code:4},{name:"Snapped",code:5}]},defaultValue:null},{name:"esrignss_receiver",type:"esriFieldTypeString",alias:"Receiver name",sqlType:"sqlTypeOther",length:50,nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_h_rms",type:"esriFieldTypeDouble",alias:"Horizontal accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_v_rms",type:"esriFieldTypeDouble",alias:"Vertical accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_latitude",type:"esriFieldTypeDouble",alias:"Latitude",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_longitude",type:"esriFieldTypeDouble",alias:"Longitude",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_altitude",type:"esriFieldTypeDouble",alias:"Ellipsoidal height (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_pdop",type:"esriFieldTypeDouble",alias:"PDOP",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_hdop",type:"esriFieldTypeDouble",alias:"HDOP",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_vdop",type:"esriFieldTypeDouble",alias:"VDOP",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_fixtype",type:"esriFieldTypeSmallInteger",alias:"Fix type",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:{type:"codedValue",name:"ESRI_FIX_TYPE_DOMAIN",codedValues:[{name:"NoFix",code:0},{name:"GPS",code:1},{name:"DifferentialGPS",code:2},{name:"PrecisePositioningService",code:3},{name:"RTKFixed",code:4},{name:"RTKFloat",code:5}]},defaultValue:null},{name:"esrignss_correctionage",type:"esriFieldTypeDouble",alias:"Correction age",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_stationid",type:"esriFieldTypeSmallInteger",alias:"Station ID",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_numsats",type:"esriFieldTypeSmallInteger",alias:"Number of satellites",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:{type:"range",name:"ESRI_NUM_SATS_DOMAIN",range:[0,99]},defaultValue:null},{name:"esrignss_fixdatetime",type:"esriFieldTypeDate",alias:"Fix time",sqlType:"sqlTypeOther",length:8,nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_avg_h_rms",type:"esriFieldTypeDouble",alias:"Average horizontal accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_avg_v_rms",type:"esriFieldTypeDouble",alias:"Average vertical accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_avg_positions",type:"esriFieldTypeInteger",alias:"Averaged positions",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_h_stddev",type:"esriFieldTypeDouble",alias:"Standard deviation (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_correction_source_name",type:"esriFieldTypeString",alias:"Correction source name",sqlType:"sqlTypeOther",length:100,nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_correction_source_type",type:"esriFieldTypeString",alias:"Correction source type",sqlType:"sqlTypeOther",length:25,nullable:!0,editable:!0,domain:{type:"codedValue",name:"esrignss_correction_source_domain",codedValues:[{name:"Unknown",code:"Unknown"},{name:"Direct IP",code:"Direct IP"},{name:"NTRIP",code:"NTRIP"},{name:"PPP",code:"PPP"},{name:"Radio",code:"Radio"},{name:"SBAS",code:"SBAS"}]},defaultValue:null},{name:"esrignss_custom_attributes",type:"esriFieldTypeString",alias:"GNSS custom attributes",sqlType:"sqlTypeOther",length:2e3,nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_h_95_status",type:"esriFieldTypeSmallInteger",alias:"95% accuracy applied",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:{type:"codedValue",name:"esrignss_yesno_domain",codedValues:[{name:"No",code:0},{name:"Yes",code:1}]},defaultValue:null},{name:"esrignss_ntrip_mount_point",type:"esriFieldTypeString",alias:"NTRIP mount point",sqlType:"sqlTypeOther",length:100,nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_antenna_height",type:"esriFieldTypeDouble",alias:"GNSS antenna height (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_orthometric_height",type:"esriFieldTypeDouble",alias:"Orthometric height (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_profile_has_hor_xform",type:"esriFieldTypeSmallInteger",alias:"Location profile horizontal datum transformation applied",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:{type:"codedValue",name:"esrignss_yesno_domain",codedValues:[{name:"No",code:0},{name:"Yes",code:1}]},defaultValue:null},{name:"esrignss_profile_hor_xform",type:"esriFieldTypeString",alias:"Location profile horizontal datum transformation",sqlType:"sqlTypeOther",length:255,nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_receiver_gcs",type:"esriFieldTypeString",alias:"Geographic coordinate system",sqlType:"sqlTypeOther",length:60,nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_receiver_gcs_wkid",type:"esriFieldTypeInteger",alias:"Geographic coordinate system WKID",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_receiver_geoid",type:"esriFieldTypeString",alias:"Receiver geoid model",sqlType:"sqlTypeOther",length:60,nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_receiver_ref_epoch",type:"esriFieldTypeDouble",alias:"Reference epoch",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null}],k=[{name:"esrisnsr_tilt_azimuth_accuracy",type:"esriFieldTypeDouble",alias:"Tilt azimuth accuracy (\xB0)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrisnsr_tilt_azimuth",type:"esriFieldTypeDouble",alias:"Tilt azimuth (\xB0)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrisnsr_tilt_angle_accuracy",type:"esriFieldTypeDouble",alias:"Tilt angle accuracy (\xB0)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrisnsr_tilt_angle",type:"esriFieldTypeDouble",alias:"Tilt angle (\xB0)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_tilt_compensated",type:"esriFieldTypeSmallInteger",alias:"Tilt compensated",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:{type:"codedValue",name:"esrignss_yesno_domain",codedValues:[{name:"No",code:0},{name:"Yes",code:1}]},defaultValue:null}],$=[{name:"esrignss_cp1_latitude",type:"esriFieldTypeDouble",alias:"CP1 latitude",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_longitude",type:"esriFieldTypeDouble",alias:"CP1 longitude",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_altitude",type:"esriFieldTypeDouble",alias:"CP1 ellipsoidal height (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_h_rms",type:"esriFieldTypeDouble",alias:"CP1 horizontal accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_v_rms",type:"esriFieldTypeDouble",alias:"CP1 vertical accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_fixdatetime",type:"esriFieldTypeDate",alias:"CP1 fix time",sqlType:"sqlTypeOther",length:8,nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_fixtype",type:"esriFieldTypeSmallInteger",alias:"CP1 fix type",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:{type:"codedValue",name:"ESRI_FIX_TYPE_DOMAIN",codedValues:[{name:"Fix not valid",code:0},{name:"GPS",code:1},{name:"Differential GPS",code:2},{name:"RTK Fixed",code:4},{name:"RTK Float",code:5}]},defaultValue:null},{name:"esrignss_cp1_corr_age",type:"esriFieldTypeDouble",alias:"CP1 correction age",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_stationid",type:"esriFieldTypeSmallInteger",alias:"CP1 station ID",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_numsats",type:"esriFieldTypeSmallInteger",alias:"CP1 number of satellites",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_pdop",type:"esriFieldTypeDouble",alias:"CP1 PDOP",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_hdop",type:"esriFieldTypeDouble",alias:"CP1 HDOP",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_vdop",type:"esriFieldTypeDouble",alias:"CP1 VDOP",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_avg_h_rms",type:"esriFieldTypeDouble",alias:"CP1 average horizontal accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_avg_v_rms",type:"esriFieldTypeDouble",alias:"CP1 average vertical accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_avg_positions",type:"esriFieldTypeInteger",alias:"CP1 averaged positions",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_h_stddev",type:"esriFieldTypeDouble",alias:"CP1 standard deviation (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrisnsr_cp1_slope_dist",type:"esriFieldTypeDouble",alias:"CP1 laser slope distance (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrisnsr_cp1_inclination",type:"esriFieldTypeDouble",alias:"CP1 laser inclination (\xB0)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrisnsr_cp1_azimuth",type:"esriFieldTypeDouble",alias:"CP1 laser azimuth (\xB0)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_latitude",type:"esriFieldTypeDouble",alias:"CP2 latitude",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_longitude",type:"esriFieldTypeDouble",alias:"CP2 longitude",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_altitude",type:"esriFieldTypeDouble",alias:"CP2 ellipsoidal height (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_h_rms",type:"esriFieldTypeDouble",alias:"CP2 horizontal accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_v_rms",type:"esriFieldTypeDouble",alias:"CP2 vertical accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_fixdatetime",type:"esriFieldTypeDate",alias:"CP2 fix time",sqlType:"sqlTypeOther",length:8,nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_fixtype",type:"esriFieldTypeSmallInteger",alias:"CP2 fix type",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:{type:"codedValue",name:"ESRI_FIX_TYPE_DOMAIN",codedValues:[{name:"Fix not valid",code:0},{name:"GPS",code:1},{name:"Differential GPS",code:2},{name:"RTK Fixed",code:4},{name:"RTK Float",code:5}]},defaultValue:null},{name:"esrignss_cp2_corr_age",type:"esriFieldTypeDouble",alias:"CP2 correction age",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_stationid",type:"esriFieldTypeSmallInteger",alias:"CP2 station ID",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_numsats",type:"esriFieldTypeSmallInteger",alias:"CP2 number of satellites",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_pdop",type:"esriFieldTypeDouble",alias:"CP2 PDOP",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_hdop",type:"esriFieldTypeDouble",alias:"CP2 HDOP",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_vdop",type:"esriFieldTypeDouble",alias:"CP2 VDOP",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_avg_h_rms",type:"esriFieldTypeDouble",alias:"CP2 average horizontal accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_avg_v_rms",type:"esriFieldTypeDouble",alias:"CP2 average vertical accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_avg_positions",type:"esriFieldTypeInteger",alias:"CP2 averaged positions",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_h_stddev",type:"esriFieldTypeDouble",alias:"CP2 standard deviation (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrisnsr_cp2_slope_dist",type:"esriFieldTypeDouble",alias:"CP2 laser slope distance (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrisnsr_cp2_inclination",type:"esriFieldTypeDouble",alias:"CP2 laser inclination (\xB0)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrisnsr_cp2_azimuth",type:"esriFieldTypeDouble",alias:"CP2 laser azimuth (\xB0)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrisnsr_offset_method",type:"esriFieldTypeString",alias:"Offset method",sqlType:"sqlTypeOther",length:5e3,nullable:!0,editable:!0,domain:{type:"codedValue",name:"ESRI_OFFSET_METHOD_DOMAIN",codedValues:[{name:"Azimuth-Azimuth",code:"azimuth-azimuth"},{name:"Distance-Angle",code:"distance-angle"},{name:"Distance-Azimuth",code:"distance-azimuth"},{name:"Distance-Distance",code:"distance-distance"},{name:"Azimuth-Azimuth-Backsight",code:"azimuth-azimuth-backsight"},{name:"Distance-Azimuth-Backsight",code:"distance-azimuth-backsight"},{name:"Distance-Distance-Backsight",code:"distance-distance-backsight"},{name:"User-defined",code:"user-defined"}]},defaultValue:null},{name:"esrisnsr_offset_device",type:"esriFieldTypeString",alias:"Rangefinder name",sqlType:"sqlTypeOther",length:5e3,nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrisnsr_offset_laser_height",type:"esriFieldTypeDouble",alias:"Rangefinder height (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrisnsr_offset_laser_target_ht",type:"esriFieldTypeDouble",alias:"Laser target height (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrisnsr_offset_mag_var",type:"esriFieldTypeDouble",alias:"Rangefinder magnetic variation (\xB0)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null}];function B(t){if(t.geometryType==="polyline"||t.geometryType==="polygon"){let e=t.capabilities;return e?.data?.supportsAttachment&&e?.operations?.supportsQueryAttachments}return!0}var U=t=>t.every(B),K=["point","polyline","polygon"],S=t=>t?.type==="Feature Service",b=class extends _{constructor(){super(...arguments),this.messages=O({blocking:!0}),this.initCount=0,this.supportsAttachments=!1,this.layersLoaded=!1,this.pointLayers=[],this.lineOrPolygonLayers=[],this.loadedItem=null,this.gpsFieldFixesBySet=null,this.addFieldsDisabled=!0,this.initializing=!0,this.hasLineOrPolygonLayer=!1,this.hasPointFeatureLayer=!1,this.addingGPSFieldMetadata=[],this.item=null,this.itemId=null,this.messageOverrides={},this.arcgisGPSMetadataFieldsAdded=h(),this.arcgisReadOnlyMode=h()}static{this.properties={loadedItem:16,gpsFieldFixesBySet:16,addFieldsDisabled:16,initializing:16,hasLineOrPolygonLayer:16,hasPointFeatureLayer:16,addingGPSFieldMetadata:16,item:0,itemId:1,portal:0,messageOverrides:0}}static{this.styles=w}connectedCallback(){super.connectedCallback(),this.hasUpdated&&this.initItem()}willUpdate(e){(e.has("item")||e.has("itemId"))&&this.initItem()}async initItem({showLoading:e=!0}={}){let a=++this.initCount;if(!this.item&&!this.itemId){this.resetItemState(),this.initializing=!1;return}e&&(this.resetItemState(),this.initializing=!0);let{item:l,itemId:s,portal:i}=this,n=l?await l.load():await new L({id:s,portal:i}).load();if(!this.isCurrentInitialization(a))return;if(!S(n)){this.resetItemState(),this.initializing=!1;return}this.loadedItem=n;let d=!e&&this.layersLoaded?[...this.pointLayers,...this.lineOrPolygonLayers]:await this.getFeatureLayers(n),{result:m}=await x(n);if(!this.isCurrentInitialization(a))return;this.layersLoaded=!0,this.pointLayers=d.filter(o=>o.geometryType==="point"),this.lineOrPolygonLayers=d.filter(o=>o.geometryType==="polyline"||o.geometryType==="polygon"),this.hasLineOrPolygonLayer=d.some(o=>o.geometryType==="polyline"||o.geometryType==="polygon"),this.hasPointFeatureLayer=d.some(o=>o.geometryType==="point");let{result:u,error:c}=d.length>0?await P({item:n,layers:d}):{};if(!this.isCurrentInitialization(a))return;if(c){this.resetItemState(),this.initializing=!1;return}let r=u??new Map;this.gpsFieldFixesBySet={base:this.analyzeFieldSet([...this.pointLayers,...this.lineOrPolygonLayers],r,"base"),gnss:this.analyzeFieldSet(this.pointLayers,r,"gnss"),rangefinder:this.analyzeFieldSet(this.pointLayers,r,"rangefinder")},this.supportsAttachments=U(d);let p=m?.sourceSchemaChangesAllowed!==!1;this.addFieldsDisabled=!this.supportsAttachments||!p,this.initializing=!1}isCurrentInitialization(e){return e===this.initCount}resetItemState(){this.loadedItem=null,this.layersLoaded=!1,this.pointLayers=[],this.lineOrPolygonLayers=[],this.gpsFieldFixesBySet=null,this.addFieldsDisabled=!0,this.hasLineOrPolygonLayer=!1,this.hasPointFeatureLayer=!1}async getFeatureLayers(e){let a=await C.fromPortalItem({portalItem:e});return await a.load(),"layers"in a?(await Promise.all(a.layers.map(async l=>(await l.load(),this.isSupportedFeatureLayer(l)?l:null)))).filter(l=>!!l):this.isSupportedFeatureLayer(a)?[a]:[]}isSupportedFeatureLayer(e){return e.type==="feature"&&K.some(a=>a===e.geometryType)}getCompatibleEsriGeometryType(e){switch(e.geometryType){case"point":return"esriGeometryPoint";case"polyline":return"esriGeometryPolyline";case"polygon":return"esriGeometryPolygon";default:return null}}analyzeFieldSet(e,a,l){let s=[];for(let i of e){if(i.layerId==null)continue;let n=a.get(i.layerId)??[],d=this.getCompatibleEsriGeometryType(i),m=d?l==="base"?E(d):l==="gnss"?V(d):D(d):[],u=R(m,n);(u.missingFields.length>0||u.modifiedFields.length>0)&&s.push({layerId:i.layerId,fieldsToAdd:u.missingFields,domainsToUpdate:u.modifiedFields})}return s}hasFieldChanges(e){return(this.gpsFieldFixesBySet?.[e].length??0)>0}isLoading(e){return this.addingGPSFieldMetadata.includes(e)}async addFields(e){let a=this.portal??this.loadedItem?.portal,l=this.loadedItem,s=this.gpsFieldFixesBySet;if(!a||!l||!s)return;if(a.isReadOnly){this.arcgisReadOnlyMode.emit();return}this.addingGPSFieldMetadata=[...this.addingGPSFieldMetadata,e];let i=[...this.pointLayers,...this.lineOrPolygonLayers];try{let n=s[e],d=(await Promise.all(n.filter(({fieldsToAdd:r})=>r.length>0).map(async({fieldsToAdd:r,layerId:p})=>await z({fields:r,item:l,layerId:p,portal:a})))).every(({error:r})=>!r),m=d?await Promise.all(n.filter(({domainsToUpdate:r})=>r.length>0).map(async({domainsToUpdate:r,layerId:p})=>await A({fields:r,item:l,layerId:p,portal:a}))):[],u=d&&m.every(({error:r})=>!r);if(!u||this.loadedItem!==l)return;let c;if(await F(async()=>{if(this.loadedItem!==l)return!0;let{result:r,error:p}=await P({item:l,layers:i});if(p||this.loadedItem!==l)return!0;if(!r)return!1;let o=e==="base"?i:i.filter(v=>v.geometryType==="point");return this.analyzeFieldSet(o,r,e).length>0?!1:(c=r,!0)},10)||console.warn("Fields were not verified on the service.",{itemId:l.id,fieldSet:e}),!c||this.loadedItem!==l)return;await this.initItem({showLoading:!1}),d&&u&&this.gpsFieldFixesBySet&&!this.hasFieldChanges(e)&&this.arcgisGPSMetadataFieldsAdded.emit(e)}finally{this.addingGPSFieldMetadata=this.addingGPSFieldMetadata.filter(n=>n!==e)}}canShowAddGPSMetadata(){let e=this.loadedItem??this.item;return!!e&&S(e)}showAdvancedFields(){let e=this.gpsFieldFixesBySet;return!this.hasPointFeatureLayer||!e?!1:this.hasFieldChanges("base")?this.pointLayers.some(a=>a.layerId==null?!1:["gnss","rangefinder"].some(l=>{let s=l==="gnss"?V("esriGeometryPoint"):D("esriGeometryPoint");return(e[l].find(({layerId:i})=>i===a.layerId)?.fieldsToAdd??[]).length<s.length})):!0}renderAddFieldsControl(e,a=!1){let l=this.gpsFieldFixesBySet;if(!a&&l&&!this.hasFieldChanges(e))return y`<span slot=actions-end class="added"><calcite-icon icon=check-circle scale=s aria-hidden></calcite-icon>${this.messages.added}</span>`;let s=this.isLoading(e);return y`<calcite-button slot=actions-end class="add-fields-button" appearance=outline-fill .disabled=${a||!l||s||this.addFieldsDisabled} .loading=${s} @click=${async()=>await this.addFields(e)}>${s?this.messages.addingFields:this.messages.addFields}</calcite-button>`}render(){return this.canShowAddGPSMetadata()?y`<div class="scrim-container"><calcite-block scale=m expanded>${this.initializing&&y`<calcite-scrim loading></calcite-scrim>`||""}<calcite-list .label=${this.messages.gpsOptions} selection-mode=none><calcite-list-item .label=${this.messages.accordionHeading}>${this.renderAddFieldsControl("base")}</calcite-list-item>${this.showAdvancedFields()&&y`<calcite-list-item .label=${this.messages.gnssReceiverFields}>${this.renderAddFieldsControl("gnss")}</calcite-list-item><calcite-list-item .label=${this.messages.laserRangefinderFields}>${this.renderAddFieldsControl("rangefinder")}</calcite-list-item>`||""}</calcite-list></calcite-block></div>`:null}};q("arcgis-portal-add-gps-metadata",b);return b},"layers/Layer","portal/PortalItem","request",a)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import a from"./XKC6SPS4.js";import{a as g}from"./QU2JYXVL.js";import{I as d,J as p,K as u,L as m,M as o,O as s,R as b,h,j as r,w as n}from"./CWSEBETE.js";export default $arcgis.t(([{c:w}])=>{var f=h`:host{position:relative;display:block}.search{position:absolute;z-index:10;margin-top:1rem;color:var(--calcite-color-text-1);pointer-events:none;inset-inline-start:1.5rem}.search--panel{inset-inline-start:.75rem}.x{position:absolute;z-index:10;top:0;margin-top:.5rem;margin-inline:.25rem;padding:.25rem;border:none;cursor:pointer;color:var(--calcite-color-text-1);outline:none;inset-inline-end:.25rem;background:transparent}.x--icon{display:block}.input{display:block;width:100%;box-sizing:border-box;padding-block:1rem;padding-inline-start:3rem;height:3rem;border:none;position:relative;z-index:0;color:var(--calcite-color-text-1);font-size:var(--calcite-font-size--1);background-color:transparent;border-bottom:2px solid transparent;font-family:inherit}.input::-webkit-search-cancel-button{display:none}.input::-ms-clear{display:none}.input:focus{outline:none;border-bottom-color:var(--calcite-color-brand)}.input--panel{padding-inline-start:2.5rem;padding-inline-end:1rem}.input--with-clear{padding-inline-end:3rem}.alert:not([calcite-hydrated]){display:none}`,c=class extends m{constructor(){super(...arguments),this.searchInput=p(),this._messages=g({name:"portal-browser",blocking:!0}),this.showClear=!1,this.containsWildcard=!1,this.term="",this.placeholder="",this.allowClear=!0,this.store=w(),this.arcgisBrowserSearch=n(),this.arcgisBrowserSearchInput=n()}static{this.properties={showClear:16,containsWildcard:16,term:1,placeholder:1,allowClear:5,store:0}}static{this.styles=f}async setFocus(){this.searchInput.value?.focus()}connectedCallback(){super.connectedCallback(),this.showClear=!!this.term,this.containsWildcard=this.term.includes("*")}willUpdate(e){e.get("term")!==void 0&&((this.searchInput.value?.value??"")!==this.term&&(this.showClear=!!this.term,this.emitUpdate(this.term)),this.containsWildcard=this.term.includes("*"))}disconnectedCallback(){this.debounceId&&(window.clearTimeout(this.debounceId),this.debounceId=void 0),super.disconnectedCallback()}emitUpdate(e){this.store.searchTerm=e,this.arcgisBrowserSearch.emit(e)}debouncedInput(e){this.debounceId&&window.clearTimeout(this.debounceId),this.debounceId=window.setTimeout(()=>{let t=e.includes("*");this.showClear=!!e,this.containsWildcard=t,t||this.emitUpdate(e)},400)}render(){let e=!!this.store.panel,t=this.placeholder||this._messages.search.search,l=this._messages.search.wildcard,v=this._messages.search.clear;return r`<div><calcite-icon icon=search scale=s class=${o({search:!0,"search--panel":e})}></calcite-icon><input class=${o({input:!0,"input--with-clear":this.allowClear&&this.showClear,"input--panel":e})} .value=${d(this.term??"")} placeholder=${t??s} aria-label=${t??s} @input=${i=>{let a=i.currentTarget.value;a.includes("*")||(this.containsWildcard=!1),this.arcgisBrowserSearchInput.emit(a),this.debouncedInput(a)}} ${u(this.searchInput)}><calcite-alert .open=${this.containsWildcard} scale=m kind=danger class="alert" icon=exclamation-mark-triangle .label=${l} @calciteAlertClose=${()=>{this.containsWildcard=!1}}><div slot=message>${l}</div></calcite-alert>${this.allowClear&&this.showClear&&r`<button class="x" aria-label=${v??s} @click=${()=>{this.arcgisBrowserSearchInput.emit(""),this.emitUpdate(""),this.showClear=!1,this.searchInput.value&&(this.searchInput.value.value="",this.searchInput.value.focus())}} @keydown=${i=>{i.key==="Enter"&&i.stopPropagation()}} tabindex=0><calcite-icon icon=x scale=m class="x--icon"></calcite-icon></button>`||""}</div>`}};b("arcgis-portal-browser-search",c);return c},a)
2
+ import a from"./3HINDHV7.js";import{a as g}from"./BKU43GE5.js";import{I as d,J as p,K as u,L as m,M as o,O as s,R as b,h,j as r,w as n}from"./VAFMKDDD.js";export default $arcgis.t(([{c:w}])=>{var f=h`:host{position:relative;display:block}.search{position:absolute;z-index:10;margin-top:1rem;color:var(--calcite-color-text-1);pointer-events:none;inset-inline-start:1.5rem}.search--panel{inset-inline-start:.75rem}.x{position:absolute;z-index:10;top:0;margin-top:.5rem;margin-inline:.25rem;padding:.25rem;border:none;cursor:pointer;color:var(--calcite-color-text-1);outline:none;inset-inline-end:.25rem;background:transparent}.x--icon{display:block}.input{display:block;width:100%;box-sizing:border-box;padding-block:1rem;padding-inline-start:3rem;height:3rem;border:none;position:relative;z-index:0;color:var(--calcite-color-text-1);font-size:var(--calcite-font-size--1);background-color:transparent;border-bottom:2px solid transparent;font-family:inherit}.input::-webkit-search-cancel-button{display:none}.input::-ms-clear{display:none}.input:focus{outline:none;border-bottom-color:var(--calcite-color-brand)}.input--panel{padding-inline-start:2.5rem;padding-inline-end:1rem}.input--with-clear{padding-inline-end:3rem}.alert:not([calcite-hydrated]){display:none}`,c=class extends m{constructor(){super(...arguments),this.searchInput=p(),this._messages=g({name:"portal-browser",blocking:!0}),this.showClear=!1,this.containsWildcard=!1,this.term="",this.placeholder="",this.allowClear=!0,this.store=w(),this.arcgisBrowserSearch=n(),this.arcgisBrowserSearchInput=n()}static{this.properties={showClear:16,containsWildcard:16,term:1,placeholder:1,allowClear:5,store:0}}static{this.styles=f}async setFocus(){this.searchInput.value?.focus()}connectedCallback(){super.connectedCallback(),this.showClear=!!this.term,this.containsWildcard=this.term.includes("*")}willUpdate(e){e.get("term")!==void 0&&((this.searchInput.value?.value??"")!==this.term&&(this.showClear=!!this.term,this.emitUpdate(this.term)),this.containsWildcard=this.term.includes("*"))}disconnectedCallback(){this.debounceId&&(window.clearTimeout(this.debounceId),this.debounceId=void 0),super.disconnectedCallback()}emitUpdate(e){this.store.searchTerm=e,this.arcgisBrowserSearch.emit(e)}debouncedInput(e){this.debounceId&&window.clearTimeout(this.debounceId),this.debounceId=window.setTimeout(()=>{let t=e.includes("*");this.showClear=!!e,this.containsWildcard=t,t||this.emitUpdate(e)},400)}render(){let e=!!this.store.panel,t=this.placeholder||this._messages.search.search,l=this._messages.search.wildcard,v=this._messages.search.clear;return r`<div><calcite-icon icon=search scale=s class=${o({search:!0,"search--panel":e})}></calcite-icon><input class=${o({input:!0,"input--with-clear":this.allowClear&&this.showClear,"input--panel":e})} .value=${d(this.term??"")} placeholder=${t??s} aria-label=${t??s} @input=${i=>{let a=i.currentTarget.value;a.includes("*")||(this.containsWildcard=!1),this.arcgisBrowserSearchInput.emit(a),this.debouncedInput(a)}} ${u(this.searchInput)}><calcite-alert .open=${this.containsWildcard} scale=m kind=danger class="alert" icon=exclamation-mark-triangle .label=${l} @calciteAlertClose=${()=>{this.containsWildcard=!1}}><div slot=message>${l}</div></calcite-alert>${this.allowClear&&this.showClear&&r`<button class="x" aria-label=${v??s} @click=${()=>{this.arcgisBrowserSearchInput.emit(""),this.emitUpdate(""),this.showClear=!1,this.searchInput.value&&(this.searchInput.value.value="",this.searchInput.value.focus())}} @keydown=${i=>{i.key==="Enter"&&i.stopPropagation()}} tabindex=0><calcite-icon icon=x scale=m class="x--icon"></calcite-icon></button>`||""}</div>`}};b("arcgis-portal-browser-search",c);return c},a)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{L as n,R as c,j as d,w as a}from"./CWSEBETE.js";var i=class extends n{constructor(){super(...arguments),this.cardProps={},this.arcgisGroupCardSelect=a(),this.arcgisGroupBrowserCardPreview=a()}static{this.properties={group:0,browser:0,cardProps:0}}async restoreFocus(){await this.renderRoot.querySelector("arcgis-portal-group-card")?.restoreFocus?.()}getBrowser(){let r=this.el.closest("arcgis-portal-group-browser");return this.browser??r}isSelected(r,t){if(!r)return!1;let e=t.selectedGroupsState;return Array.isArray(e)&&e.some(({id:o})=>o===r)}render(){let r=this.getBrowser(),t=this.group;if(!r||!t)return;let e=this.cardProps,o=r.store.view??"list";return d`<arcgis-portal-group-card .portal=${r.portal} .group=${t} .user=${e.user} .indeterminate=${e.indeterminate} .view=${o} .selection=${r.selection} .selected=${e.selected??this.isSelected(t.id,r)} .preview=${e.preview??r.preview} .previewed=${e.previewed??r.previewedGroupId===t.id} .name=${e.name} .showSummary=${e.showSummary??!0} .hideBadges=${e.hideBadges??!1} .hideDateUpdated=${e.hideDateUpdated??!1} .showDateCreated=${e.showDateCreated??!1} .hideViewableBy=${e.hideViewableBy??!1} .hideOwner=${e.hideOwner??!1} .link=${e.link} .linkHandler=${e.linkHandler} .newTab=${e.newTab??!1} .disabled=${e.disabled??!1} @arcgisGroupCardSelect=${s=>{s.stopPropagation(),this.arcgisGroupCardSelect.emit(s.detail)}} @arcgisGroupBrowserCardPreview=${s=>{s.stopPropagation(),this.arcgisGroupBrowserCardPreview.emit(s.detail)}}><slot name=content-top slot=content-top></slot><div slot=content-end><slot name=content-end></slot></div><slot name=actions-start slot=actions-start></slot><slot name=actions-end slot=actions-end></slot></arcgis-portal-group-card>`}};c("arcgis-portal-group-browser-card",i);export{i as a};
2
+ import{L as n,R as c,j as d,w as a}from"./VAFMKDDD.js";var i=class extends n{constructor(){super(...arguments),this.cardProps={},this.arcgisGroupCardSelect=a(),this.arcgisGroupBrowserCardPreview=a()}static{this.properties={group:0,browser:0,cardProps:0}}async restoreFocus(){await this.renderRoot.querySelector("arcgis-portal-group-card")?.restoreFocus?.()}getBrowser(){let r=this.el.closest("arcgis-portal-group-browser");return this.browser??r}isSelected(r,t){if(!r)return!1;let e=t.selectedGroupsState;return Array.isArray(e)&&e.some(({id:o})=>o===r)}render(){let r=this.getBrowser(),t=this.group;if(!r||!t)return;let e=this.cardProps,o=r.store.view??"list";return d`<arcgis-portal-group-card .portal=${r.portal} .group=${t} .user=${e.user} .indeterminate=${e.indeterminate} .view=${o} .selection=${r.selection} .selected=${e.selected??this.isSelected(t.id,r)} .preview=${e.preview??r.preview} .previewed=${e.previewed??r.previewedGroupId===t.id} .name=${e.name} .showSummary=${e.showSummary??!0} .hideBadges=${e.hideBadges??!1} .hideDateUpdated=${e.hideDateUpdated??!1} .showDateCreated=${e.showDateCreated??!1} .hideViewableBy=${e.hideViewableBy??!1} .hideOwner=${e.hideOwner??!1} .link=${e.link} .linkHandler=${e.linkHandler} .newTab=${e.newTab??!1} .disabled=${e.disabled??!1} @arcgisGroupCardSelect=${s=>{s.stopPropagation(),this.arcgisGroupCardSelect.emit(s.detail)}} @arcgisGroupBrowserCardPreview=${s=>{s.stopPropagation(),this.arcgisGroupBrowserCardPreview.emit(s.detail)}}><slot name=content-top slot=content-top></slot><div slot=content-end><slot name=content-end></slot></div><slot name=actions-start slot=actions-start></slot><slot name=actions-end slot=actions-end></slot></arcgis-portal-group-card>`}};c("arcgis-portal-group-browser-card",i);export{i as a};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{e as r}from"./RT6SXACX.js";import{S as o}from"./CWSEBETE.js";var s=r(o);export{s as a};
2
+ import{e as r}from"./4Z7OQ6QY.js";import{S as o}from"./VAFMKDDD.js";var s=r(o);export{s as a};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{i as o}from"./CWSEBETE.js";var c={INITIAL:0,PENDING:1,COMPLETE:2,ERROR:3},n=Symbol(),e=class{get taskComplete(){return this.t||(this.i===1?this.t=new Promise(((t,s)=>{this.o=t,this.h=s})):this.i===3?this.t=Promise.reject(this.l):this.t=Promise.resolve(this.u)),this.t}constructor(t,s,r){this.p=0,this.i=0,(this._=t).addController(this);let i=typeof s=="object"?s:{task:s,args:r};this.v=i.task,this.j=i.args,this.m=i.argsEqual??u,this.k=i.onComplete,this.A=i.onError,this.autoRun=i.autoRun??!0,"initialValue"in i&&(this.u=i.initialValue,this.i=2,this.O=this.T?.())}hostUpdate(){this.autoRun===!0&&this.S()}hostUpdated(){this.autoRun==="afterUpdate"&&this.S()}T(){if(this.j===void 0)return;let t=this.j();if(!Array.isArray(t))throw Error("The args function must return an array");return t}async S(){let t=this.T(),s=this.O;this.O=t,t===s||t===void 0||s!==void 0&&this.m(s,t)||await this.run(t)}async run(t){let s,r;t??=this.T(),this.O=t,this.i===1?this.q?.abort():(this.t=void 0,this.o=void 0,this.h=void 0),this.i=1,this.autoRun==="afterUpdate"?queueMicrotask((()=>this._.requestUpdate())):this._.requestUpdate();let i=++this.p;this.q=new AbortController;let a=!1;try{s=await this.v(t,{signal:this.q.signal})}catch(l){a=!0,r=l}if(this.p===i){if(s===n)this.i=0;else{if(a===!1){try{this.k?.(s)}catch{}this.i=2,this.o?.(s)}else{try{this.A?.(r)}catch{}this.i=3,this.h?.(r)}this.u=s,this.l=r}this._.requestUpdate()}}abort(t){this.i===1&&this.q?.abort(t)}get value(){return this.u}get error(){return this.l}get status(){return this.i}render(t){switch(this.i){case 0:return t.initial?.();case 1:return t.pending?.();case 2:return t.complete?.(this.value);case 3:return t.error?.(this.error);default:throw Error("Unexpected status: "+this.i)}}},u=(h,t)=>h===t||h.length===t.length&&h.every(((s,r)=>!o(s,t[r])));export{c as a,e as b};
2
+ import{i as o}from"./VAFMKDDD.js";var c={INITIAL:0,PENDING:1,COMPLETE:2,ERROR:3},n=Symbol(),e=class{get taskComplete(){return this.t||(this.i===1?this.t=new Promise(((t,s)=>{this.o=t,this.h=s})):this.i===3?this.t=Promise.reject(this.l):this.t=Promise.resolve(this.u)),this.t}constructor(t,s,r){this.p=0,this.i=0,(this._=t).addController(this);let i=typeof s=="object"?s:{task:s,args:r};this.v=i.task,this.j=i.args,this.m=i.argsEqual??u,this.k=i.onComplete,this.A=i.onError,this.autoRun=i.autoRun??!0,"initialValue"in i&&(this.u=i.initialValue,this.i=2,this.O=this.T?.())}hostUpdate(){this.autoRun===!0&&this.S()}hostUpdated(){this.autoRun==="afterUpdate"&&this.S()}T(){if(this.j===void 0)return;let t=this.j();if(!Array.isArray(t))throw Error("The args function must return an array");return t}async S(){let t=this.T(),s=this.O;this.O=t,t===s||t===void 0||s!==void 0&&this.m(s,t)||await this.run(t)}async run(t){let s,r;t??=this.T(),this.O=t,this.i===1?this.q?.abort():(this.t=void 0,this.o=void 0,this.h=void 0),this.i=1,this.autoRun==="afterUpdate"?queueMicrotask((()=>this._.requestUpdate())):this._.requestUpdate();let i=++this.p;this.q=new AbortController;let a=!1;try{s=await this.v(t,{signal:this.q.signal})}catch(l){a=!0,r=l}if(this.p===i){if(s===n)this.i=0;else{if(a===!1){try{this.k?.(s)}catch{}this.i=2,this.o?.(s)}else{try{this.A?.(r)}catch{}this.i=3,this.h?.(r)}this.u=s,this.l=r}this._.requestUpdate()}}abort(t){this.i===1&&this.q?.abort(t)}get value(){return this.u}get error(){return this.l}get status(){return this.i}render(t){switch(this.i){case 0:return t.initial?.();case 1:return t.pending?.();case 2:return t.complete?.(this.value);case 3:return t.error?.(this.error);default:throw Error("Unexpected status: "+this.i)}}},u=(h,t)=>h===t||h.length===t.length&&h.every(((s,r)=>!o(s,t[r])));export{c as a,e as b};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import h from"./2IRP3ZVE.js";import"./BIXJGL7B.js";import g from"./ST7YCKG6.js";import f from"./UCE5G5TL.js";import"./ILDTKRON.js";import d from"./4YPPX4Y3.js";import"./CFBSBZSS.js";import"./QDWOQBO3.js";import"./UZCHLKLO.js";import"./25XJ66JO.js";import"./5YDITHQA.js";import c from"./MXL2BB47.js";import b from"./F3ODJVJC.js";import"./OUZPGGZR.js";import"./C7NJCXTN.js";import a from"./KLQ5GKNI.js";import"./WNDPRHBO.js";import"./QS3GXAIH.js";import"./TNNIKT2R.js";import"./BKU43GE5.js";import"./4Z7OQ6QY.js";import"./K3ROLJNC.js";import{R as e}from"./VAFMKDDD.js";import"./JMA56SOB.js";import"./UZLQALHY.js";export default $arcgis.t(([,,,,,,r])=>{var t=class extends r{constructor(){super(...arguments),this.entityType="user",this.selected=null}static{this.properties={entityType:32,selected:0}}};e("arcgis-portal-user-picker",t);return t},a,b,c,d,f,g,h)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as l,c}from"./25XJ66JO.js";import"./5YDITHQA.js";import{L as a,M as s,N as n,R as i,h as r,j as e}from"./CWSEBETE.js";import"./R74ZHFA6.js";import"./UZLQALHY.js";var m=r`:host{display:block}.banner{font-weight:var(--calcite-font-weight-bold);font-size:var(--calcite-font-size-0);line-height:1.25rem;font-family:var(--calcite-sans-family);text-align:center;padding:.75rem 2rem;border-bottom:1px solid var(--calcite-color-border-1)}.banner--bottom{border-bottom:none;border-top:1px solid var(--calcite-color-border-1)}.banner__text{margin:0;padding:0;overflow-wrap:break-word}`,t=class extends a{constructor(){super(...arguments),this.position="top"}static{this.properties={config:0,position:1}}static{this.styles=m}render(){let{position:b,config:o}=this;return o?.enabled?e`<div style=${n({backgroundColor:o.bgColor,color:o.fontColor})} class=${s({banner:!0,"banner--bottom":b==="bottom"})}><p class="banner__text">${l(c(o.text))}</p></div>`:null}};i("arcgis-portal-info-banner",t);export{t as ArcgisPortalInfoBanner};
2
+ import{a as l,c}from"./25XJ66JO.js";import"./5YDITHQA.js";import{L as a,M as s,N as n,R as i,h as r,j as e}from"./VAFMKDDD.js";import"./JMA56SOB.js";import"./UZLQALHY.js";var m=r`:host{display:block}.banner{font-weight:var(--calcite-font-weight-bold);font-size:var(--calcite-font-size-0);line-height:1.25rem;font-family:var(--calcite-sans-family);text-align:center;padding:.75rem 2rem;border-bottom:1px solid var(--calcite-color-border-1)}.banner--bottom{border-bottom:none;border-top:1px solid var(--calcite-color-border-1)}.banner__text{margin:0;padding:0;overflow-wrap:break-word}`,t=class extends a{constructor(){super(...arguments),this.position="top"}static{this.properties={config:0,position:1}}static{this.styles=m}render(){let{position:b,config:o}=this;return o?.enabled?e`<div style=${n({backgroundColor:o.bgColor,color:o.fontColor})} class=${s({banner:!0,"banner--bottom":b==="bottom"})}><p class="banner__text">${l(c(o.text))}</p></div>`:null}};i("arcgis-portal-info-banner",t);export{t as ArcgisPortalInfoBanner};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{b as v}from"./TNNIKT2R.js";import{a as w}from"./QU2JYXVL.js";import"./RT6SXACX.js";import"./6BMWSGLA.js";import{J as r,K as a,L as u,O as p,R as m,h as d,j as s}from"./CWSEBETE.js";import"./R74ZHFA6.js";import"./UZLQALHY.js";var b=d`:host{display:flex;justify-content:flex-end;margin-inline:1rem;position:relative}.wrapper{padding-inline-start:.25rem;display:flex;border-inline-start:1px solid var(--calcite-color-border-1);border-inline-end:1px solid var(--calcite-color-border-1)}.tooltip-container{width:9rem}.button{margin-inline-end:.25rem}.measure-container{position:absolute;width:100%;height:0;overflow:hidden}.measure-text{visibility:hidden;height:0;width:auto;overflow:hidden;font-size:var(--calcite-font-size--1)}`,c=class extends u{constructor(){super(...arguments),this.measureText=r(),this.overflowButton=r(),this.resizeObserver=null,this.actionWidths=[],this._messages=w({name:"portal-browser",blocking:!0}),this.buttonPadding=88,this.moreWidth=0,this.elementWidth=0,this.visibleActions=[],this.overflowActions=[],this.calculating=!1,this.actions=[]}static{this.properties={visibleActions:16,overflowActions:16,calculating:16,actions:0,selection:0}}static{this.styles=b}async restoreFocus(){this.lastExecutedAction?.setFocus()}willUpdate(t){t.has("actions")&&(this.measureAndCacheWidths(this.actions),this.calculateOverflow()),t.has("selection")&&(this.hasSelection()?v(100).then(()=>{this.calculating=!1}):this.calculating=!0)}firstUpdated(){this.measureAndCacheWidths(this.actions),this.calculateOverflow(),!(typeof ResizeObserver>"u")&&(this.resizeObserver=new ResizeObserver(t=>{for(let e of t)e.contentRect.width>0&&(this.elementWidth=e.contentRect.width,this.calculateOverflow())}),this.resizeObserver.observe(this.el))}disconnectedCallback(){this.resizeObserver?.disconnect(),this.resizeObserver=null,super.disconnectedCallback()}measureAndCacheWidths(t){let e=this.measureText.value;if(!e)return;this.actionWidths=t.map(o=>(e.textContent=o.text,{action:o,width:e.offsetWidth+this.buttonPadding}));let i=this._messages.actions.more;e.textContent=i,this.moreWidth=e.scrollWidth+this.buttonPadding}calculateOverflow(){let t=this.moreWidth,e=this.actionWidths.reduce(({width:i,visible:o,overflow:l},{action:h,width:f})=>{let n=i+f;return n>=this.elementWidth?{width:n,visible:o,overflow:[...l,h]}:{width:n,visible:[...o,h],overflow:l}},{visible:[],overflow:[],width:t});this.visibleActions=e.visible,this.overflowActions=e.overflow}hasSelection(){return!!this.selection?.length}renderButton(t){let e=t.id||`${t.text}-${t.icon||"none"}`;return s`<div><calcite-button class="button" .iconStart=${t.icon} @click=${i=>{this.lastExecutedAction=i.currentTarget,t.onClick()}} appearance=transparent kind=neutral id=${e??p}>${t.text}</calcite-button>${t.tooltip&&s`<calcite-tooltip .referenceElement=${e}><span class="tooltip-container">${t.tooltip}</span></calcite-tooltip>`||""}</div>`}render(){let t=this.overflowActions.length>0,e=this._messages.actions.more;return s`<div><span class="measure-container"><span class="measure-text" aria-hidden ${a(this.measureText)}></span></span>${this.hasSelection()&&(this.visibleActions.length>0||t)&&!this.calculating&&s`<nav class="wrapper">${this.visibleActions.map(i=>this.renderButton(i))}${t&&s`<calcite-dropdown width=m placement=bottom-end><calcite-button slot=trigger kind=neutral icon-end=chevron-down appearance=transparent ${a(this.overflowButton)}>${e}</calcite-button><calcite-dropdown-group selection-mode=none>${this.overflowActions.map(i=>s`<calcite-dropdown-item .iconStart=${i.icon||"blank"} @calciteDropdownItemSelect=${()=>{this.lastExecutedAction=this.overflowButton.value||void 0,i.onClick()}}>${i.text}</calcite-dropdown-item>`)}</calcite-dropdown-group></calcite-dropdown>`||""}</nav>`||""}</div>`}};m("arcgis-portal-browser-actions",c);export{c as ArcgisPortalBrowserActions};
2
+ import{b as v}from"./TNNIKT2R.js";import{a as w}from"./BKU43GE5.js";import"./4Z7OQ6QY.js";import"./K3ROLJNC.js";import{J as r,K as a,L as u,O as p,R as m,h as d,j as s}from"./VAFMKDDD.js";import"./JMA56SOB.js";import"./UZLQALHY.js";var b=d`:host{display:flex;justify-content:flex-end;margin-inline:1rem;position:relative}.wrapper{padding-inline-start:.25rem;display:flex;border-inline-start:1px solid var(--calcite-color-border-1);border-inline-end:1px solid var(--calcite-color-border-1)}.tooltip-container{width:9rem}.button{margin-inline-end:.25rem}.measure-container{position:absolute;width:100%;height:0;overflow:hidden}.measure-text{visibility:hidden;height:0;width:auto;overflow:hidden;font-size:var(--calcite-font-size--1)}`,c=class extends u{constructor(){super(...arguments),this.measureText=r(),this.overflowButton=r(),this.resizeObserver=null,this.actionWidths=[],this._messages=w({name:"portal-browser",blocking:!0}),this.buttonPadding=88,this.moreWidth=0,this.elementWidth=0,this.visibleActions=[],this.overflowActions=[],this.calculating=!1,this.actions=[]}static{this.properties={visibleActions:16,overflowActions:16,calculating:16,actions:0,selection:0}}static{this.styles=b}async restoreFocus(){this.lastExecutedAction?.setFocus()}willUpdate(t){t.has("actions")&&(this.measureAndCacheWidths(this.actions),this.calculateOverflow()),t.has("selection")&&(this.hasSelection()?v(100).then(()=>{this.calculating=!1}):this.calculating=!0)}firstUpdated(){this.measureAndCacheWidths(this.actions),this.calculateOverflow(),!(typeof ResizeObserver>"u")&&(this.resizeObserver=new ResizeObserver(t=>{for(let e of t)e.contentRect.width>0&&(this.elementWidth=e.contentRect.width,this.calculateOverflow())}),this.resizeObserver.observe(this.el))}disconnectedCallback(){this.resizeObserver?.disconnect(),this.resizeObserver=null,super.disconnectedCallback()}measureAndCacheWidths(t){let e=this.measureText.value;if(!e)return;this.actionWidths=t.map(o=>(e.textContent=o.text,{action:o,width:e.offsetWidth+this.buttonPadding}));let i=this._messages.actions.more;e.textContent=i,this.moreWidth=e.scrollWidth+this.buttonPadding}calculateOverflow(){let t=this.moreWidth,e=this.actionWidths.reduce(({width:i,visible:o,overflow:l},{action:h,width:f})=>{let n=i+f;return n>=this.elementWidth?{width:n,visible:o,overflow:[...l,h]}:{width:n,visible:[...o,h],overflow:l}},{visible:[],overflow:[],width:t});this.visibleActions=e.visible,this.overflowActions=e.overflow}hasSelection(){return!!this.selection?.length}renderButton(t){let e=t.id||`${t.text}-${t.icon||"none"}`;return s`<div><calcite-button class="button" .iconStart=${t.icon} @click=${i=>{this.lastExecutedAction=i.currentTarget,t.onClick()}} appearance=transparent kind=neutral id=${e??p}>${t.text}</calcite-button>${t.tooltip&&s`<calcite-tooltip .referenceElement=${e}><span class="tooltip-container">${t.tooltip}</span></calcite-tooltip>`||""}</div>`}render(){let t=this.overflowActions.length>0,e=this._messages.actions.more;return s`<div><span class="measure-container"><span class="measure-text" aria-hidden ${a(this.measureText)}></span></span>${this.hasSelection()&&(this.visibleActions.length>0||t)&&!this.calculating&&s`<nav class="wrapper">${this.visibleActions.map(i=>this.renderButton(i))}${t&&s`<calcite-dropdown width=m placement=bottom-end><calcite-button slot=trigger kind=neutral icon-end=chevron-down appearance=transparent ${a(this.overflowButton)}>${e}</calcite-button><calcite-dropdown-group selection-mode=none>${this.overflowActions.map(i=>s`<calcite-dropdown-item .iconStart=${i.icon||"blank"} @calciteDropdownItemSelect=${()=>{this.lastExecutedAction=this.overflowButton.value||void 0,i.onClick()}}>${i.text}</calcite-dropdown-item>`)}</calcite-dropdown-group></calcite-dropdown>`||""}</nav>`||""}</div>`}};m("arcgis-portal-browser-actions",c);export{c as ArcgisPortalBrowserActions};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{b as p}from"./R74ZHFA6.js";export default $arcgis.t(([m,y,S,b])=>{var q=t=>typeof t=="string"&&t.length>0?t:void 0,w=()=>p(),E=t=>typeof t!="string"||t.trim().length===0?"MapsSDK":`MapsSDK - ${t.trim()}`,I=t=>{let n=t?.configurable;return{conversationId:q(n?.thread_id),abortSignal:t?.signal,requestId:w(),requestSource:E(S.applicationName)}},v=t=>{if(t==null||typeof t=="string"||t instanceof FormData||t instanceof HTMLFormElement)return t;if(t instanceof URLSearchParams)return t.toString();throw new TypeError(`Unsupported request body type: ${Object.prototype.toString.call(t)}`)},k=async({config:t,withCredentials:n})=>{let g=y.getDefault(),f=await m.getCredential(`${g.url}/sharing`);return async(o,r)=>{let{conversationId:a,abortSignal:s,requestId:u,requestSource:i}=I(t),e=new Headers(r?.headers);for(let d of[...e.keys()]){let c=d.toLowerCase();(c==="authorization"||c==="api-key"||c.startsWith("x-stainless-"))&&e.delete(d)}let l=f?.token;l&&l.length>0&&e.set("X-Esri-Authorization",`Bearer ${l}`),g.isPortal||(i&&i.length>0&&e.set("X-Esri-Request-Source",i),a&&a.length>0&&e.set("X-Esri-Conversation-Id",a),u.length>0&&e.set("X-Esri-Request-Id",u));let h=s&&r?.signal?AbortSignal.any([s,r.signal]):r?.signal??s;return(await b(o instanceof Request?o.url:o.toString(),{body:v(r?.body),headers:Object.fromEntries(e),responseType:"native",withCredentials:n,signal:h})).data}};return k},"identity/IdentityManager","portal/Portal","config","request")
2
+ import{b as p}from"./JMA56SOB.js";export default $arcgis.t(([m,y,S,b])=>{var q=t=>typeof t=="string"&&t.length>0?t:void 0,w=()=>p(),E=t=>typeof t!="string"||t.trim().length===0?"MapsSDK":`MapsSDK - ${t.trim()}`,I=t=>{let n=t?.configurable;return{conversationId:q(n?.thread_id),abortSignal:t?.signal,requestId:w(),requestSource:E(S.applicationName)}},v=t=>{if(t==null||typeof t=="string"||t instanceof FormData||t instanceof HTMLFormElement)return t;if(t instanceof URLSearchParams)return t.toString();throw new TypeError(`Unsupported request body type: ${Object.prototype.toString.call(t)}`)},k=async({config:t,withCredentials:n})=>{let g=y.getDefault(),f=await m.getCredential(`${g.url}/sharing`);return async(o,r)=>{let{conversationId:a,abortSignal:s,requestId:u,requestSource:i}=I(t),e=new Headers(r?.headers);for(let d of[...e.keys()]){let c=d.toLowerCase();(c==="authorization"||c==="api-key"||c.startsWith("x-stainless-"))&&e.delete(d)}let l=f?.token;l&&l.length>0&&e.set("X-Esri-Authorization",`Bearer ${l}`),g.isPortal||(i&&i.length>0&&e.set("X-Esri-Request-Source",i),a&&a.length>0&&e.set("X-Esri-Conversation-Id",a),u.length>0&&e.set("X-Esri-Request-Id",u));let h=s&&r?.signal?AbortSignal.any([s,r.signal]):r?.signal??s;return(await b(o instanceof Request?o.url:o.toString(),{body:v(r?.body),headers:Object.fromEntries(e),responseType:"native",withCredentials:n,signal:h})).data}};return k},"identity/IdentityManager","portal/Portal","config","request")
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as v}from"./6BMWSGLA.js";import{t as y,u as m,y as h}from"./CWSEBETE.js";export default $arcgis.t(([{on:B,watch:E},{createObservable:x,trackAccess:w},{property:C,subclass:b},g])=>{var Y=(r,e)=>n=>P(n,r),u=class extends h{constructor(e,n){super(e),this.Y=new Map,this.A=void 0,this.#o=x();let t=this;t.#e=n,t.Z(),t.setProvisionalExports(k(e,new WeakRef(t),e.M.length-1,t.instance,t.Y),!1),y(e,s=>{if(s){let c=E(()=>e[s],o=>{if(o===t.instance)return;let i=t.instance;t.exports=o,t.instance=o,t.Y.forEach((a,l)=>e.requestUpdate(a,i[l])),t.#t&&i.destroy(),t.#t=!1},{sync:!0});t.onDestroy(c.remove)}},t.exports)}#t;#o;#e;get exports(){return w(this.#o),super.exports}set exports(e){super.exports=e,this.#o.notify()}Z(){let e=this;e.instance="prototype"in e.#e&&"declaredClass"in e.#e.prototype?new e.#e:e.#e(),e.#t=!0}hostConnected(){this.exports=this.instance}hostDestroy(){this.#t&&this.instance.destroy?.()}},P=v(u),k=(r,e,n,t,s)=>new Proxy(t,{get:(c,o)=>{let i=c[o];if(typeof o=="symbol"||s.has(o))return i;let a=r.M[n];return a.A=o,m(r,l=>{if(a.A=void 0,l!==void 0){let p=l.key;s.set(o,p);let d=r.constructor.getPropertyOptions(p),f=o!==p&&p.toLowerCase().includes("disable");A(e,d,o,p,f),d.i===void 0&&O(d,n,o,f)}},i)}}),A=(r,e,n,t,s,c)=>c=E(()=>{let o=r.deref();return o===void 0||o.component.manager.destroyed?c=c.remove():o.exports[n]},(o,i)=>{if(!c)return;r.deref().component?.requestUpdate(t,s?!i:i),e.c=!1},{sync:!0}),O=(r,e,n,t)=>{r.d.get=function(){let s=this.M[e]?.exports[n];return t?!s:s},r.d.set=function(s){let c=this.M[e];c.A!==n&&(c.exports[n]=t?!s:s)}};var T=r=>{let e=class extends g{},n=typeof r=="function"?r():r,t=Object.getOwnPropertyDescriptors(n);for(let[c,o]of Object.entries(t))Object.defineProperty(e.prototype,c,o),C()(e.prototype,c);let s=b()(e);return new s};return{a:Y,b:T}},"core/reactiveUtils","applications/Components/reactiveUtils","core/accessorSupport/decorators","core/Accessor")
2
+ import{a as v}from"./K3ROLJNC.js";import{t as y,u as m,y as h}from"./VAFMKDDD.js";export default $arcgis.t(([{on:B,watch:E},{createObservable:x,trackAccess:w},{property:C,subclass:b},g])=>{var Y=(r,e)=>n=>P(n,r),u=class extends h{constructor(e,n){super(e),this.Y=new Map,this.A=void 0,this.#o=x();let t=this;t.#e=n,t.Z(),t.setProvisionalExports(k(e,new WeakRef(t),e.M.length-1,t.instance,t.Y),!1),y(e,s=>{if(s){let c=E(()=>e[s],o=>{if(o===t.instance)return;let i=t.instance;t.exports=o,t.instance=o,t.Y.forEach((a,l)=>e.requestUpdate(a,i[l])),t.#t&&i.destroy(),t.#t=!1},{sync:!0});t.onDestroy(c.remove)}},t.exports)}#t;#o;#e;get exports(){return w(this.#o),super.exports}set exports(e){super.exports=e,this.#o.notify()}Z(){let e=this;e.instance="prototype"in e.#e&&"declaredClass"in e.#e.prototype?new e.#e:e.#e(),e.#t=!0}hostConnected(){this.exports=this.instance}hostDestroy(){this.#t&&this.instance.destroy?.()}},P=v(u),k=(r,e,n,t,s)=>new Proxy(t,{get:(c,o)=>{let i=c[o];if(typeof o=="symbol"||s.has(o))return i;let a=r.M[n];return a.A=o,m(r,l=>{if(a.A=void 0,l!==void 0){let p=l.key;s.set(o,p);let d=r.constructor.getPropertyOptions(p),f=o!==p&&p.toLowerCase().includes("disable");A(e,d,o,p,f),d.i===void 0&&O(d,n,o,f)}},i)}}),A=(r,e,n,t,s,c)=>c=E(()=>{let o=r.deref();return o===void 0||o.component.manager.destroyed?c=c.remove():o.exports[n]},(o,i)=>{if(!c)return;r.deref().component?.requestUpdate(t,s?!i:i),e.c=!1},{sync:!0}),O=(r,e,n,t)=>{r.d.get=function(){let s=this.M[e]?.exports[n];return t?!s:s},r.d.set=function(s){let c=this.M[e];c.A!==n&&(c.exports[n]=t?!s:s)}};var T=r=>{let e=class extends g{},n=typeof r=="function"?r():r,t=Object.getOwnPropertyDescriptors(n);for(let[c,o]of Object.entries(t))Object.defineProperty(e.prototype,c,o),C()(e.prototype,c);let s=b()(e);return new s};return{a:Y,b:T}},"core/reactiveUtils","applications/Components/reactiveUtils","core/accessorSupport/decorators","core/Accessor")
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import f from"./LD5ZMPBH.js";import"./6TO2BYXU.js";import e from"./HWDSHH76.js";import"./6KVA4AKM.js";import"./ILDTKRON.js";import"./CFBSBZSS.js";import"./25XJ66JO.js";import"./5YDITHQA.js";import d from"./MXL2BB47.js";import c from"./F3ODJVJC.js";import b from"./KLQ5GKNI.js";import"./WNDPRHBO.js";import"./QS3GXAIH.js";import"./TNNIKT2R.js";import"./QU2JYXVL.js";import"./RT6SXACX.js";import"./6BMWSGLA.js";import{L as r,R as o,h as i,j as a}from"./CWSEBETE.js";import"./R74ZHFA6.js";import"./UZLQALHY.js";export default $arcgis.t(([,,,,{a:p}])=>{var n=i`:host{display:flex;flex-wrap:wrap;align-items:center}.portal-item-badges__badge{display:inline-block;margin-inline-end:.25rem}.portal-item-badges__badge:last-of-type{margin-inline-end:0}`,e=class extends r{constructor(){super(...arguments),this.badges=[],this.width="full",this.scale="m",this.showTooltips=!1,this.empty=!1}static{this.properties={badges:16,item:0,portal:0,user:0,width:1,appearance:1,scale:1,showTooltips:5,useProduction:5,empty:7}}static{this.styles=n}willUpdate(t){if(t.has("item")||t.has("portal")||t.has("user")){if(!this.item||!this.portal){this.badges=[],this.empty=!0;return}let s=p(this.item,this.portal,this.user);this.badges=s,this.empty=s.length===0}}render(){let{appearance:t,badges:s,scale:l,showTooltips:h,width:m}=this;return s.map(d=>a`<arcgis-portal-item-badge .appearance=${t} .badgeType=${d} class="portal-item-badges__badge" .item=${this.item} .portal=${this.portal} .user=${this.user} .scale=${l} .showTooltip=${h} .useProduction=${this.useProduction} .width=${m}></arcgis-portal-item-badge>`)}};o("arcgis-portal-item-badges",e);return e},b,c,d,e,f)
2
+ import f from"./JIWLTMFC.js";import"./6TO2BYXU.js";import e from"./HWDSHH76.js";import"./6KVA4AKM.js";import"./ILDTKRON.js";import"./CFBSBZSS.js";import"./25XJ66JO.js";import"./5YDITHQA.js";import d from"./MXL2BB47.js";import c from"./F3ODJVJC.js";import b from"./KLQ5GKNI.js";import"./WNDPRHBO.js";import"./QS3GXAIH.js";import"./TNNIKT2R.js";import"./BKU43GE5.js";import"./4Z7OQ6QY.js";import"./K3ROLJNC.js";import{L as r,R as o,h as i,j as a}from"./VAFMKDDD.js";import"./JMA56SOB.js";import"./UZLQALHY.js";export default $arcgis.t(([,,,,{a:p}])=>{var n=i`:host{display:flex;flex-wrap:wrap;align-items:center}.portal-item-badges__badge{display:inline-block;margin-inline-end:.25rem}.portal-item-badges__badge:last-of-type{margin-inline-end:0}`,e=class extends r{constructor(){super(...arguments),this.badges=[],this.width="full",this.scale="m",this.showTooltips=!1,this.empty=!1}static{this.properties={badges:16,item:0,portal:0,user:0,width:1,appearance:1,scale:1,showTooltips:5,useProduction:5,empty:7}}static{this.styles=n}willUpdate(t){if(t.has("item")||t.has("portal")||t.has("user")){if(!this.item||!this.portal){this.badges=[],this.empty=!0;return}let s=p(this.item,this.portal,this.user);this.badges=s,this.empty=s.length===0}}render(){let{appearance:t,badges:s,scale:l,showTooltips:h,width:m}=this;return s.map(d=>a`<arcgis-portal-item-badge .appearance=${t} .badgeType=${d} class="portal-item-badges__badge" .item=${this.item} .portal=${this.portal} .user=${this.user} .scale=${l} .showTooltip=${h} .useProduction=${this.useProduction} .width=${m}></arcgis-portal-item-badge>`)}};o("arcgis-portal-item-badges",e);return e},b,c,d,e,f)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import b from"./W3UGJC24.js";import{a as L}from"./CFBSBZSS.js";import{a as g}from"./UZCHLKLO.js";import{a as D,b as F}from"./25XJ66JO.js";import a from"./MXL2BB47.js";import{a as G}from"./OV5O7YP4.js";import{a as T}from"./D7LRCAK4.js";import{g as C,h as S,i as A}from"./WNDPRHBO.js";import{b as h}from"./QS3GXAIH.js";import{a as m}from"./TNNIKT2R.js";import{a as M}from"./QU2JYXVL.js";import{J as R,K as $,L as k,M as I,R as x,h as O,j as n,w as v}from"./CWSEBETE.js";export default $arcgis.t(([{substitute:y},{a:P},{g:E,h:z}])=>{var f='-typekeywords:("MapAreaPackage") -type:("Map Area" OR "Indoors Map Configuration" OR "Code Attachment")';async function U(r){let e=C(r),t=[],s=[r.featuredItemsGroupQuery,r.basemapGalleryGroupQuery,r.basemapGalleryGroupQuery3D,r.templatesGroupQuery,e["2DStylesGroupQuery"],e.stylesGroupQuery,e.analysisLayersGroupQuery,r.galleryTemplatesGroupQuery].filter(o=>!!o),a=r.homePageFeaturedContent;if(S(r)){let o=await z(r),l=[];o?.result?.content?.forEach(p=>{A(p)&&l.push(p)}),l.length>0&&l.forEach(({groupId:p})=>{let d=`id:${p}`;t=u(d,t)})}else a&&s.push(a);if(s.forEach(o=>{t=u(o,t)}),r.featuredGroups?.forEach(o=>{if("id"in o&&o.id){let l=`id:${o.id}`;t=u(l,t)}else{let l=`(${Object.entries(o).map(p=>`${p[0]}:"${p[1]}"`).join(" ")})`;t=u(l,t,!0)}}),r.user)try{(await E(r))?.groups?.forEach(o=>{let l=`id:${o}`;t=u(l,t)})}catch(o){console.warn("Error fetching member defaults:",o)}return t.length>0?`(${t.join(" OR ")})`:""}function u(r,e,t){return!r?.startsWith("id:")&&!t||e.includes(r)?[...e]:[...e,r]}function B(r,e){let t=`${h({portal:r})}/home/group.html?id=${encodeURIComponent(e.id)}`;return{group:t,content:`${t}&view=list#content`,members:`${t}#members`,settings:`${t}#settings`}}function Y(r,e,t){if(!r||!e)return"";switch(r){case"owner":return`owner:${e}`;case"inOrg":return`-owner:${e} orgid:${t.orgId||""}`;case"outsideOrg":return t.isPublicUser?`-owner:${e}`:`(orgid: [0 TO \\{]) -orgid:${t.orgId||""}`;case null:return"";default:return m(r)}}function Z(r,e){if(e)return"membershipaccess:org";switch(r){case"org":return"membershipaccess:org";case"collaboration":return"membershipaccess:collaboration";case"anyOrg":return"membershipaccess:NULL";case null:return"";default:return m(r)}}function ee(r,e){switch(r){case"myOrg":return"memberorgids:NULL";case"anotherOrg":return e?`(memberorgids:${e} OR orgid:${e})`:"-memberorgids:NULL";case null:return"";default:return m(r)}}async function te(r,e){switch(r){case"openData":return"isopendata:true";case"sharedUpdate":return"capabilities:updateitemcontrol";case"distributed":return"capabilities:distributed";case"admin":return"isleavingdisallowed:true";case"settings":return await U(e);case null:return"";default:return m(r)}}function re(r){return r?`access: ${r}`:""}function q(r){switch(g(r).displaySettings?.itemTypes?.split(",")[0]?.toLowerCase()){case"application":return'type:("Curated Collection" OR "GeoBIM Application" OR "Data Pipeline" OR "GeoBIM Project" OR "Code Sample" OR "Web Mapping Application" OR "Mobile Application" OR "Application" OR "Desktop Application Template" OR "Desktop Application" OR "Operation View" OR "Dashboard" OR "Operations Dashboard Extension" OR "Workforce Project" OR "Insights Workbook" OR "Insights Page" OR "Insights Model" OR "Hub Page" OR "Hub Initiative" OR "Hub Site Application" OR "StoryMap" OR "Web Experience" OR "Web Experience Template" OR "Form" OR "Map Showcase") -typekeywords: "Story Map"';case"web map":return'type:("Web Map" OR "CityEngine Web Scene")';case"web scene":return'type:"Web Scene"';case"locator package":return'type:("Geocoding Service" OR "Locator Package")';case"csv":return'type:("CSV" OR "Microsoft Excel" OR "PDF" OR "Image" OR "Document Link" OR "Report Template" OR "Style")';case"layer":return'(type:"Parquet Feature Layer" OR type:"Scene Service" OR type:"Feature Collection" OR type:"Route Layer" OR type:"Layer" OR type:"Explorer Layer" OR type:"Tile Package" OR type:"Compact Tile Package" OR type:"Vector Tile Package" OR type:"Scene Package" OR type:"Layer Package" OR type:"Feature Service" OR type:"Stream Service" OR type:"Feed" OR type:"Map Service" OR type:"Vector Tile Service" OR type:"Media Layer" OR type:"Image Service" OR type:"WMS" OR type:"WFS" OR type:"WMTS" OR type:"KML" OR type:"Group Layer" OR type:"Knowledge Graph Layer" OR typekeywords:"OGC" OR typekeywords:"Geodata Service" OR type:"Globe Service" OR type:"CSV" OR type:"Shapefile" OR type:"GeoJson" OR type:"Service Definition" OR type:"File Geodatabase" OR type:"CAD Drawing" OR type:"Relational Database Connection" OR type:"GeoPackage" OR "3DTiles Service") -type:("Web Mapping Application" OR "Geodata Service" OR "3DTiles Package")';default:return f}}var W=O`:host{display:flex;height:100%;width:100%;flex:1 1 0%;flex-direction:column;background-color:var(--calcite-color-background)}.preview{box-sizing:border-box;display:flex;flex-direction:column;gap:0;height:100%;min-height:0;overflow:auto;padding:0;position:relative}.preview__header{align-items:center;background:var(--calcite-color-foreground-1);display:flex;justify-content:space-between;padding:0;padding-inline-start:.75rem}.preview__title{color:var(--calcite-color-text-1);font-size:var(--calcite-font-size-0);font-weight:var(--calcite-font-weight-medium);line-height:1.375;margin:0;overflow-wrap:anywhere;flex:1 1 auto}.preview__accordion{--calcite-accordion-item-header-background-color: var(--calcite-color-foreground-1);--calcite-accordion-item-heading-text-size: var(--calcite-font-size-0)}.preview__accordion calcite-accordion-item{--calcite-internal-accordion-item-padding: 1rem 1rem;border-bottom:1px solid var(--calcite-color-border-2);box-sizing:border-box;width:100%}.preview__section{background:var(--calcite-color-background);line-height:1.35;margin:-1rem;padding:1rem}.preview__section--tight{padding:0}.preview__summary{color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--1);line-height:1.45;margin:0}.preview__description{--item-browser-table-border: 1px solid var(--calcite-color-border-2);color:var(--calcite-color-text-2);line-height:1.35;overflow-wrap:anywhere;*{font-size:.875rem;max-width:100%}a{color:var(--calcite-color-text-link)}img,video{height:auto;max-width:100%}table{background:var(--calcite-color-foreground-1);border:var(--item-browser-table-border);border-collapse:collapse;border-spacing:0;font-size:var(--calcite-font-size--2);overflow:auto;text-align:start;width:100%}table>thead{background:var(--calcite-color-foreground-1);border-bottom:var(--item-browser-table-border);font-weight:var(--calcite-font-weight-normal)}table>tbody{overflow:auto;width:100%}table>tfoot{border-top:var(--item-browser-table-border)}th,td{border-inline:var(--item-browser-table-border);font-weight:var(--calcite-font-weight-light);padding:.5rem;text-align:start}tr{border-bottom:var(--item-browser-table-border);text-align:start}tr:last-child{border-bottom:none}}.preview__empty{color:var(--calcite-color-text-1);margin:0}.preview__empty-wrap{align-items:center;display:flex;flex-direction:column;gap:.5rem;padding:.5rem}.preview__loading-placeholder{min-height:2rem}.preview__empty-icon{color:var(--calcite-color-text-1);height:3rem;width:3rem}.preview__badges{margin-top:1rem}.preview__badges[empty]{display:none}.preview__full-card-wrapper{padding:.75rem .5rem 0}.preview__card{margin:0}.preview__card-body{display:grid;gap:.125rem}.preview__user-popup{overflow:hidden}.preview__settings-title{color:var(--calcite-color-text-3);font-size:var(--calcite-font-size--2);margin:0}.preview__settings-text{color:var(--calcite-color-text-1);margin:0;line-height:1.4}.preview__link-wrap{margin-top:.75rem;padding:0 .25rem 1rem}.preview__footer-actions{width:100%;display:flex;flex-direction:column}.preview__footer-actions--spaced{gap:.5rem}.preview__card-container{display:flex;flex-direction:column;gap:.25rem}.preview__settings-section{display:flex;flex-direction:column;gap:1.25rem}.preview__settings-row{display:grid;gap:.25rem}.preview__link-wrap--settings{padding-inline:0}`,j=async(r,e)=>{try{let t=r.id?(await e.queryGroups({query:`id:${r.id}`,num:1})).results[0]??r:r;t.portal=e;let s=g(t),a=s.properties?.featuredItemIds??[],o=!!(s.properties?.isFeatured&&a.length),[{items:l,total:p},d]=await Promise.all([o?N(t,a):Q(t),t.fetchMembers()]),c=[d.owner,...d.admins.filter(w=>w!==d.owner)],i=await Promise.all(c.map(async w=>await P(w,e)));return{result:{group:t,items:l,total:p,members:d,managers:i}}}catch(t){return console.error(t),{error:{code:"unhandledError"}}}},_=4;async function N(r,e){let t=await r.queryItems({num:Math.min(_,e.length),query:`id:(${e.slice(0,_).join(" OR ")})`});return{items:e.map(s=>t.results.find(a=>a.id===s)).filter(s=>!!s),total:t.total||e.length}}async function Q(r){let{sortField:e="modified",sortOrder:t="desc"}=g(r),s=q(r)||f,a=await r.queryItems({num:_,sortField:e,sortOrder:t,query:s});return{items:a.results||[],total:a.total||0}}var b=class extends k{constructor(){super(...arguments),this.messages=M({name:"portal-group-browser",blocking:!0}),this.requestId=0,this.flowItemEl=R(),this.loading=!1,this.contentItems=[],this.contentTotal=0,this.managers=[],this.fullGroup=null,this.hideBadges=!1,this.hidePreviewFooter=!1,this.previewFooterActionsSpaced=!1,this.arcgisGroupBrowserPreviewClose=v(),this.arcgisGroupBrowserInternalUIAction=v()}static{this.properties={loading:16,contentItems:16,contentTotal:16,managers:16,fullGroup:16,group:0,portal:0,user:0,hideBadges:5,hidePreviewFooter:5,currentResponse:0,previewFooterActionsSpaced:5}}static{this.styles=W}async setFocus(){this.flowItemEl.value?.setFocus()}connectedCallback(){super.connectedCallback(),this.loadPreviewData()}willUpdate(e){(e.has("group")||e.has("portal"))&&this.loadPreviewData()}getGroupSummary(e){return F(e.snippet||"")}getGroupDescriptionHtml(e){return D(e.description||"")}async loadPreviewData(){let{group:e,portal:t}=this,s=++this.requestId;this.loading=!0,this.contentItems=[],this.contentTotal=0,this.managers=[],this.fullGroup=null;let{result:a,error:o}=await j(e,t);s===this.requestId&&(this.loading=!1,!(o||!a)&&s===this.requestId&&(this.contentItems=a.items,this.contentTotal=a.total,this.managers=a.managers,this.fullGroup=a.group,this.flowItemEl.value?.setFocus()))}getPreviewPosition(e){if(!e)return;let t=this.currentResponse?.results?.findIndex(a=>a.id===e);if(t==null||t<0)return;let s=this.currentResponse?.start??1;return t+s}isAccordionItem(e){return e instanceof HTMLElement&&e.tagName==="CALCITE-ACCORDION-ITEM"}handleAccordionItemClick(e,t){e&&this.arcgisGroupBrowserInternalUIAction.emit({action:e.expanded?"expand":"collapse",category:"group panel action",details:t})}handleDetailsClick(e){this.arcgisGroupBrowserInternalUIAction.emit({action:"click",category:"group panel action",details:e})}getAccessText(e){switch(g(e).access){case"public":return this.messages.preview.everyone;case"private":return this.messages.preview.onlyMembers;case"org":return this.messages.preview.onlyOrganization;case"shared":return this.messages.preview.onlyOrganizationAndPartners;default:return this.messages.preview.unknownValue}}getContributorsText(e){return g(e).isViewOnly?this.messages.preview.onlyOwnerManager:this.messages.preview.allMembers}getJoinMethodText(e){let t=g(e);return t.autoJoin?this.messages.preview.byAutojoin:e.isInvitationOnly?this.messages.preview.byInvitation:t.providerGroupName?this.messages.preview.byEnterprise:this.messages.preview.byRequest}render(){let e=this.fullGroup??this.group,t=this.getGroupSummary(e),s=this.getGroupDescriptionHtml(e),{group:a,content:o,members:l,settings:p}=B(this.portal,e),d=this.user?.username===e.owner,c=this.messages.preview;return n`<calcite-flow><calcite-flow-item closable .loading=${this.loading} @calciteFlowItemClose=${()=>{this.arcgisGroupBrowserInternalUIAction.emit({action:"close panel",category:"group panel action"}),this.arcgisGroupBrowserPreviewClose.emit()}} ${$(this.flowItemEl)}><div slot=header-content class="preview__header"><h3 class="preview__title">${e.title||this.messages.preview.titleFallback}</h3></div><section class="preview">${G(e.id,n`<calcite-accordion icon-position=start appearance=transparent class="preview__accordion"><calcite-accordion-item .heading=${this.messages.preview.overview} .expanded=${!!t} @click=${i=>this.isAccordionItem(i.target)&&this.handleAccordionItemClick(i.currentTarget,"overview")}><div class="preview__section">${t?n`<p class="preview__summary">${t}</p>`:n`<p class="preview__empty">${this.messages.preview.noSummary}</p>`}${this.hideBadges?null:n`<arcgis-portal-group-badges .group=${e} .portal=${this.portal} width=full scale=s appearance=outline-fill class="preview__badges"></arcgis-portal-group-badges>`}</div></calcite-accordion-item><calcite-accordion-item .heading=${c.description} @click=${i=>this.isAccordionItem(i.target)&&this.handleAccordionItemClick(i.currentTarget,"description")}><div class="preview__section">${s?n`<div class="preview__description" .innerHTML=${s??""}></div>`:n`<p class="preview__empty">${c.noDescription}</p>`}</div></calcite-accordion-item><calcite-accordion-item .heading=${y(c.content,{count:String(this.contentTotal)})} expanded @click=${i=>this.isAccordionItem(i.target)&&this.handleAccordionItemClick(i.currentTarget,"content")}><div class="preview__section preview__section--tight">${this.contentItems.length?n`<div class="preview__full-card-wrapper"><div class="preview__card-container">${T(this.contentItems,i=>i.id,i=>n`<arcgis-portal-group-browser-preview-card class="preview__card" .item=${i} .portal=${this.portal} .user=${this.user}></arcgis-portal-group-browser-preview-card>`)}</div><div class="preview__link-wrap"><calcite-link .href=${o} @click=${()=>{this.handleDetailsClick("view all content")}}>${this.messages.preview.viewContent}</calcite-link></div></div>`:this.loading?n`<div class="preview__loading-placeholder"></div>`:n`<div class="preview__empty-wrap"><calcite-icon scale=l icon=files class="preview__empty-icon"></calcite-icon><p class="preview__empty">${this.messages.preview.noContent}</p></div>`}</div></calcite-accordion-item><calcite-accordion-item .heading=${y(c.groupManagers,{count:String(this.managers.length)})} expanded @click=${i=>this.isAccordionItem(i.target)&&this.handleAccordionItemClick(i.currentTarget,"managers")}><div class="preview__section preview__section--tight"><div class="preview__full-card-wrapper">${this.managers.length?n`<div class="preview__card-container">${this.managers.map(i=>n`<calcite-card class="preview__card"><div class="preview__card-body"><arcgis-portal-user-popup class="preview__user-popup" .fullName=${i.username===e.owner?y(c.groupOwner,{fullName:L(i,this.messages._lang)}):i.fullName} show-name show-username .user=${i} .portal=${this.portal} .baseUrl=${h({portal:this.portal})}></arcgis-portal-user-popup></div></calcite-card>`)}</div>`:this.loading?n`<div class="preview__loading-placeholder"></div>`:n`<p class="preview__empty">${c.noManagers}</p>`}<div class="preview__link-wrap"><calcite-link .href=${l} @click=${()=>{this.handleDetailsClick("open members page")}}>${c.openMembers}</calcite-link></div></div></div></calcite-accordion-item><calcite-accordion-item .heading=${c.settings} .expanded=${d} @click=${i=>this.isAccordionItem(i.target)&&this.handleAccordionItemClick(i.currentTarget,"settings")}><div class="preview__section preview__settings-section"><div class="preview__settings-row"><h4 class="preview__settings-title">${c.viewableBy}:</h4><p class="preview__settings-text">${this.getAccessText(e)}</p></div><div class="preview__settings-row"><h4 class="preview__settings-title">${c.contributors}:</h4><p class="preview__settings-text">${this.getContributorsText(e)}</p></div>${d?n`<div class="preview__settings-row"><h4 class="preview__settings-title">${c.joinMethod}:</h4><p class="preview__settings-text">${this.getJoinMethodText(e)}</p><div class="preview__link-wrap preview__link-wrap--settings"><calcite-link .href=${p} @click=${()=>{this.handleDetailsClick("open settings")}}>${c.openSettings}</calcite-link></div></div>`:null}</div></calcite-accordion-item></calcite-accordion>`)}</section>${!this.hidePreviewFooter&&n`<div slot=footer class=${I({"preview__footer-actions":!0,"preview__footer-actions--spaced":this.previewFooterActionsSpaced})}><calcite-button appearance=solid kind=neutral width=full .href=${a} @click=${()=>{this.arcgisGroupBrowserInternalUIAction.emit({action:"click",category:"group panel action",details:"view group details",position:this.getPreviewPosition(e.id)})}}>${c.openGroupPage}</calcite-button><slot name=footer-action></slot></div>`||""}</calcite-flow-item></calcite-flow>`}};x("arcgis-portal-group-browser-preview",b);return{a:U,b:Y,c:Z,d:ee,e:te,f:re,g:b}},"intl",a,b)
2
+ import b from"./W3UGJC24.js";import{a as L}from"./CFBSBZSS.js";import{a as g}from"./UZCHLKLO.js";import{a as D,b as F}from"./25XJ66JO.js";import a from"./MXL2BB47.js";import{a as G}from"./OUZPGGZR.js";import{a as T}from"./53GR4QVG.js";import{g as C,h as S,i as A}from"./WNDPRHBO.js";import{b as h}from"./QS3GXAIH.js";import{a as m}from"./TNNIKT2R.js";import{a as M}from"./BKU43GE5.js";import{J as R,K as $,L as k,M as I,R as x,h as O,j as n,w as v}from"./VAFMKDDD.js";export default $arcgis.t(([{substitute:y},{a:P},{g:E,h:z}])=>{var f='-typekeywords:("MapAreaPackage") -type:("Map Area" OR "Indoors Map Configuration" OR "Code Attachment")';async function U(r){let e=C(r),t=[],s=[r.featuredItemsGroupQuery,r.basemapGalleryGroupQuery,r.basemapGalleryGroupQuery3D,r.templatesGroupQuery,e["2DStylesGroupQuery"],e.stylesGroupQuery,e.analysisLayersGroupQuery,r.galleryTemplatesGroupQuery].filter(o=>!!o),a=r.homePageFeaturedContent;if(S(r)){let o=await z(r),l=[];o?.result?.content?.forEach(p=>{A(p)&&l.push(p)}),l.length>0&&l.forEach(({groupId:p})=>{let d=`id:${p}`;t=u(d,t)})}else a&&s.push(a);if(s.forEach(o=>{t=u(o,t)}),r.featuredGroups?.forEach(o=>{if("id"in o&&o.id){let l=`id:${o.id}`;t=u(l,t)}else{let l=`(${Object.entries(o).map(p=>`${p[0]}:"${p[1]}"`).join(" ")})`;t=u(l,t,!0)}}),r.user)try{(await E(r))?.groups?.forEach(o=>{let l=`id:${o}`;t=u(l,t)})}catch(o){console.warn("Error fetching member defaults:",o)}return t.length>0?`(${t.join(" OR ")})`:""}function u(r,e,t){return!r?.startsWith("id:")&&!t||e.includes(r)?[...e]:[...e,r]}function B(r,e){let t=`${h({portal:r})}/home/group.html?id=${encodeURIComponent(e.id)}`;return{group:t,content:`${t}&view=list#content`,members:`${t}#members`,settings:`${t}#settings`}}function Y(r,e,t){if(!r||!e)return"";switch(r){case"owner":return`owner:${e}`;case"inOrg":return`-owner:${e} orgid:${t.orgId||""}`;case"outsideOrg":return t.isPublicUser?`-owner:${e}`:`(orgid: [0 TO \\{]) -orgid:${t.orgId||""}`;case null:return"";default:return m(r)}}function Z(r,e){if(e)return"membershipaccess:org";switch(r){case"org":return"membershipaccess:org";case"collaboration":return"membershipaccess:collaboration";case"anyOrg":return"membershipaccess:NULL";case null:return"";default:return m(r)}}function ee(r,e){switch(r){case"myOrg":return"memberorgids:NULL";case"anotherOrg":return e?`(memberorgids:${e} OR orgid:${e})`:"-memberorgids:NULL";case null:return"";default:return m(r)}}async function te(r,e){switch(r){case"openData":return"isopendata:true";case"sharedUpdate":return"capabilities:updateitemcontrol";case"distributed":return"capabilities:distributed";case"admin":return"isleavingdisallowed:true";case"settings":return await U(e);case null:return"";default:return m(r)}}function re(r){return r?`access: ${r}`:""}function q(r){switch(g(r).displaySettings?.itemTypes?.split(",")[0]?.toLowerCase()){case"application":return'type:("Curated Collection" OR "GeoBIM Application" OR "Data Pipeline" OR "GeoBIM Project" OR "Code Sample" OR "Web Mapping Application" OR "Mobile Application" OR "Application" OR "Desktop Application Template" OR "Desktop Application" OR "Operation View" OR "Dashboard" OR "Operations Dashboard Extension" OR "Workforce Project" OR "Insights Workbook" OR "Insights Page" OR "Insights Model" OR "Hub Page" OR "Hub Initiative" OR "Hub Site Application" OR "StoryMap" OR "Web Experience" OR "Web Experience Template" OR "Form" OR "Map Showcase") -typekeywords: "Story Map"';case"web map":return'type:("Web Map" OR "CityEngine Web Scene")';case"web scene":return'type:"Web Scene"';case"locator package":return'type:("Geocoding Service" OR "Locator Package")';case"csv":return'type:("CSV" OR "Microsoft Excel" OR "PDF" OR "Image" OR "Document Link" OR "Report Template" OR "Style")';case"layer":return'(type:"Parquet Feature Layer" OR type:"Scene Service" OR type:"Feature Collection" OR type:"Route Layer" OR type:"Layer" OR type:"Explorer Layer" OR type:"Tile Package" OR type:"Compact Tile Package" OR type:"Vector Tile Package" OR type:"Scene Package" OR type:"Layer Package" OR type:"Feature Service" OR type:"Stream Service" OR type:"Feed" OR type:"Map Service" OR type:"Vector Tile Service" OR type:"Media Layer" OR type:"Image Service" OR type:"WMS" OR type:"WFS" OR type:"WMTS" OR type:"KML" OR type:"Group Layer" OR type:"Knowledge Graph Layer" OR typekeywords:"OGC" OR typekeywords:"Geodata Service" OR type:"Globe Service" OR type:"CSV" OR type:"Shapefile" OR type:"GeoJson" OR type:"Service Definition" OR type:"File Geodatabase" OR type:"CAD Drawing" OR type:"Relational Database Connection" OR type:"GeoPackage" OR "3DTiles Service") -type:("Web Mapping Application" OR "Geodata Service" OR "3DTiles Package")';default:return f}}var W=O`:host{display:flex;height:100%;width:100%;flex:1 1 0%;flex-direction:column;background-color:var(--calcite-color-background)}.preview{box-sizing:border-box;display:flex;flex-direction:column;gap:0;height:100%;min-height:0;overflow:auto;padding:0;position:relative}.preview__header{align-items:center;background:var(--calcite-color-foreground-1);display:flex;justify-content:space-between;padding:0;padding-inline-start:.75rem}.preview__title{color:var(--calcite-color-text-1);font-size:var(--calcite-font-size-0);font-weight:var(--calcite-font-weight-medium);line-height:1.375;margin:0;overflow-wrap:anywhere;flex:1 1 auto}.preview__accordion{--calcite-accordion-item-header-background-color: var(--calcite-color-foreground-1);--calcite-accordion-item-heading-text-size: var(--calcite-font-size-0)}.preview__accordion calcite-accordion-item{--calcite-internal-accordion-item-padding: 1rem 1rem;border-bottom:1px solid var(--calcite-color-border-2);box-sizing:border-box;width:100%}.preview__section{background:var(--calcite-color-background);line-height:1.35;margin:-1rem;padding:1rem}.preview__section--tight{padding:0}.preview__summary{color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--1);line-height:1.45;margin:0}.preview__description{--item-browser-table-border: 1px solid var(--calcite-color-border-2);color:var(--calcite-color-text-2);line-height:1.35;overflow-wrap:anywhere;*{font-size:.875rem;max-width:100%}a{color:var(--calcite-color-text-link)}img,video{height:auto;max-width:100%}table{background:var(--calcite-color-foreground-1);border:var(--item-browser-table-border);border-collapse:collapse;border-spacing:0;font-size:var(--calcite-font-size--2);overflow:auto;text-align:start;width:100%}table>thead{background:var(--calcite-color-foreground-1);border-bottom:var(--item-browser-table-border);font-weight:var(--calcite-font-weight-normal)}table>tbody{overflow:auto;width:100%}table>tfoot{border-top:var(--item-browser-table-border)}th,td{border-inline:var(--item-browser-table-border);font-weight:var(--calcite-font-weight-light);padding:.5rem;text-align:start}tr{border-bottom:var(--item-browser-table-border);text-align:start}tr:last-child{border-bottom:none}}.preview__empty{color:var(--calcite-color-text-1);margin:0}.preview__empty-wrap{align-items:center;display:flex;flex-direction:column;gap:.5rem;padding:.5rem}.preview__loading-placeholder{min-height:2rem}.preview__empty-icon{color:var(--calcite-color-text-1);height:3rem;width:3rem}.preview__badges{margin-top:1rem}.preview__badges[empty]{display:none}.preview__full-card-wrapper{padding:.75rem .5rem 0}.preview__card{margin:0}.preview__card-body{display:grid;gap:.125rem}.preview__user-popup{overflow:hidden}.preview__settings-title{color:var(--calcite-color-text-3);font-size:var(--calcite-font-size--2);margin:0}.preview__settings-text{color:var(--calcite-color-text-1);margin:0;line-height:1.4}.preview__link-wrap{margin-top:.75rem;padding:0 .25rem 1rem}.preview__footer-actions{width:100%;display:flex;flex-direction:column}.preview__footer-actions--spaced{gap:.5rem}.preview__card-container{display:flex;flex-direction:column;gap:.25rem}.preview__settings-section{display:flex;flex-direction:column;gap:1.25rem}.preview__settings-row{display:grid;gap:.25rem}.preview__link-wrap--settings{padding-inline:0}`,j=async(r,e)=>{try{let t=r.id?(await e.queryGroups({query:`id:${r.id}`,num:1})).results[0]??r:r;t.portal=e;let s=g(t),a=s.properties?.featuredItemIds??[],o=!!(s.properties?.isFeatured&&a.length),[{items:l,total:p},d]=await Promise.all([o?N(t,a):Q(t),t.fetchMembers()]),c=[d.owner,...d.admins.filter(w=>w!==d.owner)],i=await Promise.all(c.map(async w=>await P(w,e)));return{result:{group:t,items:l,total:p,members:d,managers:i}}}catch(t){return console.error(t),{error:{code:"unhandledError"}}}},_=4;async function N(r,e){let t=await r.queryItems({num:Math.min(_,e.length),query:`id:(${e.slice(0,_).join(" OR ")})`});return{items:e.map(s=>t.results.find(a=>a.id===s)).filter(s=>!!s),total:t.total||e.length}}async function Q(r){let{sortField:e="modified",sortOrder:t="desc"}=g(r),s=q(r)||f,a=await r.queryItems({num:_,sortField:e,sortOrder:t,query:s});return{items:a.results||[],total:a.total||0}}var b=class extends k{constructor(){super(...arguments),this.messages=M({name:"portal-group-browser",blocking:!0}),this.requestId=0,this.flowItemEl=R(),this.loading=!1,this.contentItems=[],this.contentTotal=0,this.managers=[],this.fullGroup=null,this.hideBadges=!1,this.hidePreviewFooter=!1,this.previewFooterActionsSpaced=!1,this.arcgisGroupBrowserPreviewClose=v(),this.arcgisGroupBrowserInternalUIAction=v()}static{this.properties={loading:16,contentItems:16,contentTotal:16,managers:16,fullGroup:16,group:0,portal:0,user:0,hideBadges:5,hidePreviewFooter:5,currentResponse:0,previewFooterActionsSpaced:5}}static{this.styles=W}async setFocus(){this.flowItemEl.value?.setFocus()}connectedCallback(){super.connectedCallback(),this.loadPreviewData()}willUpdate(e){(e.has("group")||e.has("portal"))&&this.loadPreviewData()}getGroupSummary(e){return F(e.snippet||"")}getGroupDescriptionHtml(e){return D(e.description||"")}async loadPreviewData(){let{group:e,portal:t}=this,s=++this.requestId;this.loading=!0,this.contentItems=[],this.contentTotal=0,this.managers=[],this.fullGroup=null;let{result:a,error:o}=await j(e,t);s===this.requestId&&(this.loading=!1,!(o||!a)&&s===this.requestId&&(this.contentItems=a.items,this.contentTotal=a.total,this.managers=a.managers,this.fullGroup=a.group,this.flowItemEl.value?.setFocus()))}getPreviewPosition(e){if(!e)return;let t=this.currentResponse?.results?.findIndex(a=>a.id===e);if(t==null||t<0)return;let s=this.currentResponse?.start??1;return t+s}isAccordionItem(e){return e instanceof HTMLElement&&e.tagName==="CALCITE-ACCORDION-ITEM"}handleAccordionItemClick(e,t){e&&this.arcgisGroupBrowserInternalUIAction.emit({action:e.expanded?"expand":"collapse",category:"group panel action",details:t})}handleDetailsClick(e){this.arcgisGroupBrowserInternalUIAction.emit({action:"click",category:"group panel action",details:e})}getAccessText(e){switch(g(e).access){case"public":return this.messages.preview.everyone;case"private":return this.messages.preview.onlyMembers;case"org":return this.messages.preview.onlyOrganization;case"shared":return this.messages.preview.onlyOrganizationAndPartners;default:return this.messages.preview.unknownValue}}getContributorsText(e){return g(e).isViewOnly?this.messages.preview.onlyOwnerManager:this.messages.preview.allMembers}getJoinMethodText(e){let t=g(e);return t.autoJoin?this.messages.preview.byAutojoin:e.isInvitationOnly?this.messages.preview.byInvitation:t.providerGroupName?this.messages.preview.byEnterprise:this.messages.preview.byRequest}render(){let e=this.fullGroup??this.group,t=this.getGroupSummary(e),s=this.getGroupDescriptionHtml(e),{group:a,content:o,members:l,settings:p}=B(this.portal,e),d=this.user?.username===e.owner,c=this.messages.preview;return n`<calcite-flow><calcite-flow-item closable .loading=${this.loading} @calciteFlowItemClose=${()=>{this.arcgisGroupBrowserInternalUIAction.emit({action:"close panel",category:"group panel action"}),this.arcgisGroupBrowserPreviewClose.emit()}} ${$(this.flowItemEl)}><div slot=header-content class="preview__header"><h3 class="preview__title">${e.title||this.messages.preview.titleFallback}</h3></div><section class="preview">${G(e.id,n`<calcite-accordion icon-position=start appearance=transparent class="preview__accordion"><calcite-accordion-item .heading=${this.messages.preview.overview} .expanded=${!!t} @click=${i=>this.isAccordionItem(i.target)&&this.handleAccordionItemClick(i.currentTarget,"overview")}><div class="preview__section">${t?n`<p class="preview__summary">${t}</p>`:n`<p class="preview__empty">${this.messages.preview.noSummary}</p>`}${this.hideBadges?null:n`<arcgis-portal-group-badges .group=${e} .portal=${this.portal} width=full scale=s appearance=outline-fill class="preview__badges"></arcgis-portal-group-badges>`}</div></calcite-accordion-item><calcite-accordion-item .heading=${c.description} @click=${i=>this.isAccordionItem(i.target)&&this.handleAccordionItemClick(i.currentTarget,"description")}><div class="preview__section">${s?n`<div class="preview__description" .innerHTML=${s??""}></div>`:n`<p class="preview__empty">${c.noDescription}</p>`}</div></calcite-accordion-item><calcite-accordion-item .heading=${y(c.content,{count:String(this.contentTotal)})} expanded @click=${i=>this.isAccordionItem(i.target)&&this.handleAccordionItemClick(i.currentTarget,"content")}><div class="preview__section preview__section--tight">${this.contentItems.length?n`<div class="preview__full-card-wrapper"><div class="preview__card-container">${T(this.contentItems,i=>i.id,i=>n`<arcgis-portal-group-browser-preview-card class="preview__card" .item=${i} .portal=${this.portal} .user=${this.user}></arcgis-portal-group-browser-preview-card>`)}</div><div class="preview__link-wrap"><calcite-link .href=${o} @click=${()=>{this.handleDetailsClick("view all content")}}>${this.messages.preview.viewContent}</calcite-link></div></div>`:this.loading?n`<div class="preview__loading-placeholder"></div>`:n`<div class="preview__empty-wrap"><calcite-icon scale=l icon=files class="preview__empty-icon"></calcite-icon><p class="preview__empty">${this.messages.preview.noContent}</p></div>`}</div></calcite-accordion-item><calcite-accordion-item .heading=${y(c.groupManagers,{count:String(this.managers.length)})} expanded @click=${i=>this.isAccordionItem(i.target)&&this.handleAccordionItemClick(i.currentTarget,"managers")}><div class="preview__section preview__section--tight"><div class="preview__full-card-wrapper">${this.managers.length?n`<div class="preview__card-container">${this.managers.map(i=>n`<calcite-card class="preview__card"><div class="preview__card-body"><arcgis-portal-user-popup class="preview__user-popup" .fullName=${i.username===e.owner?y(c.groupOwner,{fullName:L(i,this.messages._lang)}):i.fullName} show-name show-username .user=${i} .portal=${this.portal} .baseUrl=${h({portal:this.portal})}></arcgis-portal-user-popup></div></calcite-card>`)}</div>`:this.loading?n`<div class="preview__loading-placeholder"></div>`:n`<p class="preview__empty">${c.noManagers}</p>`}<div class="preview__link-wrap"><calcite-link .href=${l} @click=${()=>{this.handleDetailsClick("open members page")}}>${c.openMembers}</calcite-link></div></div></div></calcite-accordion-item><calcite-accordion-item .heading=${c.settings} .expanded=${d} @click=${i=>this.isAccordionItem(i.target)&&this.handleAccordionItemClick(i.currentTarget,"settings")}><div class="preview__section preview__settings-section"><div class="preview__settings-row"><h4 class="preview__settings-title">${c.viewableBy}:</h4><p class="preview__settings-text">${this.getAccessText(e)}</p></div><div class="preview__settings-row"><h4 class="preview__settings-title">${c.contributors}:</h4><p class="preview__settings-text">${this.getContributorsText(e)}</p></div>${d?n`<div class="preview__settings-row"><h4 class="preview__settings-title">${c.joinMethod}:</h4><p class="preview__settings-text">${this.getJoinMethodText(e)}</p><div class="preview__link-wrap preview__link-wrap--settings"><calcite-link .href=${p} @click=${()=>{this.handleDetailsClick("open settings")}}>${c.openSettings}</calcite-link></div></div>`:null}</div></calcite-accordion-item></calcite-accordion>`)}</section>${!this.hidePreviewFooter&&n`<div slot=footer class=${I({"preview__footer-actions":!0,"preview__footer-actions--spaced":this.previewFooterActionsSpaced})}><calcite-button appearance=solid kind=neutral width=full .href=${a} @click=${()=>{this.arcgisGroupBrowserInternalUIAction.emit({action:"click",category:"group panel action",details:"view group details",position:this.getPreviewPosition(e.id)})}}>${c.openGroupPage}</calcite-button><slot name=footer-action></slot></div>`||""}</calcite-flow-item></calcite-flow>`}};x("arcgis-portal-group-browser-preview",b);return{a:U,b:Y,c:Z,d:ee,e:te,f:re,g:b}},"intl",a,b)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as m}from"./D7LRCAK4.js";import{a as h}from"./QU2JYXVL.js";import"./RT6SXACX.js";import"./6BMWSGLA.js";import{L as b,O as a,R as d,h as c,j as i,w as u}from"./CWSEBETE.js";import"./R74ZHFA6.js";import"./UZLQALHY.js";var g=c`.spacing-y{margin:var(--calcite-spacing-md) 0}.portal-classification-form-element-tooltip{display:flex;justify-content:space-between;align-items:center}`;function s(o,e){return o.uiElement===e}var n=class extends b{constructor(){super(...arguments),this.messages=h(),this.isRequiredErrors=new Set,this.arcgisAttributeValueChange=u()}static{this.properties={validationMsg:16,attributeKey:1,attribute:0,value:0,renderingInfo:0,isRequiredErrors:0}}static{this.styles=g}willUpdate(e){(e.has("renderingInfo")||e.has("isRequiredErrors"))&&(this.validationMsg=this._getValidationMessage())}_getValidationMessage(){if(this.renderingInfo?.attributeValidationResult)return this.renderingInfo.attributeValidationResult;if(this.isRequiredErrors.has(this.attributeKey))return this.messages.requiredfield??"This is a required field."}renderCheckbox(){return s(this.attribute,"checkbox")?i`<calcite-label class="spacing-y" .for=${this.attributeKey} layout=inline><calcite-checkbox .checked=${this.value} id=${this.attributeKey??a} @calciteCheckboxChange=${e=>this.arcgisAttributeValueChange.emit({[this.attributeKey]:e.target.checked})} .required=${this.attribute.isRequired??!1} .status=${this.validationMsg?"invalid":"valid"}></calcite-checkbox>${this.attribute.label}</calcite-label>`:null}renderDateInput(){return s(this.attribute,"date")?i`<calcite-label .for=${this.attributeKey}>${this.attribute.label}<calcite-input-date-picker id=${this.attributeKey??a} .name=${this.attribute.label} @calciteInputDatePickerChange=${e=>this.isConnected&&this.arcgisAttributeValueChange.emit({[this.attributeKey]:e.target.value})} overlay-positioning=fixed .required=${this.attribute.isRequired} .status=${this.validationMsg?"invalid":"valid"} validation-icon=exclamation-mark-triangle .validationMessage=${this.validationMsg} .value=${this.value}></calcite-input-date-picker></calcite-label>`:null}renderTextInput(){if(!s(this.attribute,"text"))return null;let e=this.attribute.label,t=this.attribute.description;return i`<calcite-label .for=${this.attributeKey}><div class="portal-classification-form-element-tooltip">${e}${this.attribute.labelTooltip&&i`<div><calcite-icon scale=s icon=information .id=${`tooltip-button-${this.attribute.bannerLabel}`} text-label=${this.messages.information??"Information"??a}></calcite-icon><calcite-tooltip .referenceElement=${`tooltip-button-${this.attribute.bannerLabel}`} placement=right>${this.attribute.labelTooltip}</calcite-tooltip></div>`||""}</div><calcite-input-text id=${this.attributeKey??a} .label=${e} .name=${this.attributeKey} @calciteInputTextChange=${r=>this.arcgisAttributeValueChange.emit({[this.attributeKey]:r.target.value})} .placeholder=${t} .required=${this.attribute.isRequired} .status=${this.validationMsg?"invalid":"valid"} validation-icon=exclamation-mark-triangle .validationMessage=${this.validationMsg} .value=${this.value}></calcite-input-text></calcite-label>`}renderSingleSelect(){return s(this.attribute,"single-select")?i`<calcite-label .for=${this.attributeKey}>${this.attribute.label}<calcite-combobox selection-mode=single id=${this.attributeKey??a} .label=${this.attribute.label} .name=${this.attributeKey} @calciteComboboxChange=${e=>this.arcgisAttributeValueChange.emit({[this.attributeKey]:e.target.value})} .placeholder=${this.attribute.description??this.messages.selectanoption} .required=${this.attribute.isRequired} .status=${this.validationMsg?"invalid":"valid"} overlay-positioning=fixed validation-icon=exclamation-mark-triangle .validationMessage=${this.validationMsg} .value=${this.value} data-testid=${`single-select-${this.attributeKey}`}>${this._renderSingleSelectComboboxOptions()}</calcite-combobox></calcite-label>`:null}_renderSingleSelectComboboxOptions(){if(!Array.isArray(this.renderingInfo?.valueExpressionResult))return;let e=this.value;return m(this.renderingInfo?.valueExpressionResult,t=>t.label,t=>i`<calcite-combobox-item .selected=${e===t.value} .heading=${t.label} .value=${t.value} data-testid=${`single-combobox-item-${t.value}`}></calcite-combobox-item>`)}_renderComboboxOptions(){if(!Array.isArray(this.renderingInfo?.valueExpressionResult))return;let e=this.value;return this.renderingInfo?.valueExpressionResult.map(t=>i`<calcite-combobox-item .selected=${e?.includes(t.value)} .heading=${t.label} .value=${t.value} data-testid=${`combobox-item-${t.value}`}></calcite-combobox-item>`)}renderMultiSelect(){return s(this.attribute,"multi-select")?i`<calcite-label .for=${this.attributeKey}>${this.attribute.label}<calcite-combobox id=${this.attributeKey??a} .label=${this.attribute.label} .name=${this.attributeKey} @calciteComboboxChange=${e=>{let t=e.target.value;this.arcgisAttributeValueChange.emit({[this.attributeKey]:t?Array.isArray(t)?t:[t]:void 0})}} .placeholder=${this.attribute.description??this.messages.selectoptions} .required=${this.attribute.isRequired} .status=${this.validationMsg?"invalid":"valid"} validation-icon=exclamation-mark-triangle .validationMessage=${this.validationMsg} .value=${this.value}>${this._renderComboboxOptions()}</calcite-combobox></calcite-label>`:null}_renderGroupedComboboxOptions(){if(!this.renderingInfo?.valueExpressionResult||Array.isArray(this.renderingInfo?.valueExpressionResult))return;let e=this.value;return Object.entries(this.renderingInfo?.valueExpressionResult).map(([t,r])=>i`<calcite-combobox-item .selected=${e?.includes(t)} .heading=${t} .value=${t}>${r.map(l=>i`<calcite-combobox-item .selected=${e?.includes(l.value)} .heading=${l.label} .value=${l.value} data-testid=${`grouped-combobox-item-${l.value}`}></calcite-combobox-item>`)}</calcite-combobox-item>`)}renderMultiGroupedSelectNested(){return s(this.attribute,"multi-grouped-select-nested")?i`<calcite-label .for=${this.attributeKey}>${this.attribute.label}<calcite-combobox id=${this.attributeKey??a} .label=${this.attribute.label} .name=${this.attributeKey} @calciteComboboxChange=${e=>{let t=e.target.value;this.arcgisAttributeValueChange.emit({[this.attributeKey]:t?Array.isArray(t)?t:[t]:void 0})}} .placeholder=${this.attribute.description??this.messages.selectoptions} .required=${this.attribute.isRequired} .status=${this.validationMsg?"invalid":"valid"} validation-icon=exclamation-mark-triangle .validationMessage=${this.validationMsg} .value=${this.value}>${this._renderGroupedComboboxOptions()}</calcite-combobox></calcite-label>`:null}render(){switch(this.attribute.uiElement){case"checkbox":return this.renderCheckbox();case"date":return this.renderDateInput();case"multi-select":return this.renderMultiSelect();case"multi-grouped-select-nested":return this.renderMultiGroupedSelectNested();case"single-select":return this.renderSingleSelect();case"text":return this.renderTextInput();default:return i`<div>Not Implemented Yet.</div>`}}};d("arcgis-portal-classification-form-element",n);export{n as ArcgisPortalClassificationFormElement};
2
+ import{a as m}from"./53GR4QVG.js";import{a as h}from"./BKU43GE5.js";import"./4Z7OQ6QY.js";import"./K3ROLJNC.js";import{L as b,O as a,R as d,h as c,j as i,w as u}from"./VAFMKDDD.js";import"./JMA56SOB.js";import"./UZLQALHY.js";var g=c`.spacing-y{margin:var(--calcite-spacing-md) 0}.portal-classification-form-element-tooltip{display:flex;justify-content:space-between;align-items:center}`;function s(o,e){return o.uiElement===e}var n=class extends b{constructor(){super(...arguments),this.messages=h(),this.isRequiredErrors=new Set,this.arcgisAttributeValueChange=u()}static{this.properties={validationMsg:16,attributeKey:1,attribute:0,value:0,renderingInfo:0,isRequiredErrors:0}}static{this.styles=g}willUpdate(e){(e.has("renderingInfo")||e.has("isRequiredErrors"))&&(this.validationMsg=this._getValidationMessage())}_getValidationMessage(){if(this.renderingInfo?.attributeValidationResult)return this.renderingInfo.attributeValidationResult;if(this.isRequiredErrors.has(this.attributeKey))return this.messages.requiredfield??"This is a required field."}renderCheckbox(){return s(this.attribute,"checkbox")?i`<calcite-label class="spacing-y" .for=${this.attributeKey} layout=inline><calcite-checkbox .checked=${this.value} id=${this.attributeKey??a} @calciteCheckboxChange=${e=>this.arcgisAttributeValueChange.emit({[this.attributeKey]:e.target.checked})} .required=${this.attribute.isRequired??!1} .status=${this.validationMsg?"invalid":"valid"}></calcite-checkbox>${this.attribute.label}</calcite-label>`:null}renderDateInput(){return s(this.attribute,"date")?i`<calcite-label .for=${this.attributeKey}>${this.attribute.label}<calcite-input-date-picker id=${this.attributeKey??a} .name=${this.attribute.label} @calciteInputDatePickerChange=${e=>this.isConnected&&this.arcgisAttributeValueChange.emit({[this.attributeKey]:e.target.value})} overlay-positioning=fixed .required=${this.attribute.isRequired} .status=${this.validationMsg?"invalid":"valid"} validation-icon=exclamation-mark-triangle .validationMessage=${this.validationMsg} .value=${this.value}></calcite-input-date-picker></calcite-label>`:null}renderTextInput(){if(!s(this.attribute,"text"))return null;let e=this.attribute.label,t=this.attribute.description;return i`<calcite-label .for=${this.attributeKey}><div class="portal-classification-form-element-tooltip">${e}${this.attribute.labelTooltip&&i`<div><calcite-icon scale=s icon=information .id=${`tooltip-button-${this.attribute.bannerLabel}`} text-label=${this.messages.information??"Information"??a}></calcite-icon><calcite-tooltip .referenceElement=${`tooltip-button-${this.attribute.bannerLabel}`} placement=right>${this.attribute.labelTooltip}</calcite-tooltip></div>`||""}</div><calcite-input-text id=${this.attributeKey??a} .label=${e} .name=${this.attributeKey} @calciteInputTextChange=${r=>this.arcgisAttributeValueChange.emit({[this.attributeKey]:r.target.value})} .placeholder=${t} .required=${this.attribute.isRequired} .status=${this.validationMsg?"invalid":"valid"} validation-icon=exclamation-mark-triangle .validationMessage=${this.validationMsg} .value=${this.value}></calcite-input-text></calcite-label>`}renderSingleSelect(){return s(this.attribute,"single-select")?i`<calcite-label .for=${this.attributeKey}>${this.attribute.label}<calcite-combobox selection-mode=single id=${this.attributeKey??a} .label=${this.attribute.label} .name=${this.attributeKey} @calciteComboboxChange=${e=>this.arcgisAttributeValueChange.emit({[this.attributeKey]:e.target.value})} .placeholder=${this.attribute.description??this.messages.selectanoption} .required=${this.attribute.isRequired} .status=${this.validationMsg?"invalid":"valid"} overlay-positioning=fixed validation-icon=exclamation-mark-triangle .validationMessage=${this.validationMsg} .value=${this.value} data-testid=${`single-select-${this.attributeKey}`}>${this._renderSingleSelectComboboxOptions()}</calcite-combobox></calcite-label>`:null}_renderSingleSelectComboboxOptions(){if(!Array.isArray(this.renderingInfo?.valueExpressionResult))return;let e=this.value;return m(this.renderingInfo?.valueExpressionResult,t=>t.label,t=>i`<calcite-combobox-item .selected=${e===t.value} .heading=${t.label} .value=${t.value} data-testid=${`single-combobox-item-${t.value}`}></calcite-combobox-item>`)}_renderComboboxOptions(){if(!Array.isArray(this.renderingInfo?.valueExpressionResult))return;let e=this.value;return this.renderingInfo?.valueExpressionResult.map(t=>i`<calcite-combobox-item .selected=${e?.includes(t.value)} .heading=${t.label} .value=${t.value} data-testid=${`combobox-item-${t.value}`}></calcite-combobox-item>`)}renderMultiSelect(){return s(this.attribute,"multi-select")?i`<calcite-label .for=${this.attributeKey}>${this.attribute.label}<calcite-combobox id=${this.attributeKey??a} .label=${this.attribute.label} .name=${this.attributeKey} @calciteComboboxChange=${e=>{let t=e.target.value;this.arcgisAttributeValueChange.emit({[this.attributeKey]:t?Array.isArray(t)?t:[t]:void 0})}} .placeholder=${this.attribute.description??this.messages.selectoptions} .required=${this.attribute.isRequired} .status=${this.validationMsg?"invalid":"valid"} validation-icon=exclamation-mark-triangle .validationMessage=${this.validationMsg} .value=${this.value}>${this._renderComboboxOptions()}</calcite-combobox></calcite-label>`:null}_renderGroupedComboboxOptions(){if(!this.renderingInfo?.valueExpressionResult||Array.isArray(this.renderingInfo?.valueExpressionResult))return;let e=this.value;return Object.entries(this.renderingInfo?.valueExpressionResult).map(([t,r])=>i`<calcite-combobox-item .selected=${e?.includes(t)} .heading=${t} .value=${t}>${r.map(l=>i`<calcite-combobox-item .selected=${e?.includes(l.value)} .heading=${l.label} .value=${l.value} data-testid=${`grouped-combobox-item-${l.value}`}></calcite-combobox-item>`)}</calcite-combobox-item>`)}renderMultiGroupedSelectNested(){return s(this.attribute,"multi-grouped-select-nested")?i`<calcite-label .for=${this.attributeKey}>${this.attribute.label}<calcite-combobox id=${this.attributeKey??a} .label=${this.attribute.label} .name=${this.attributeKey} @calciteComboboxChange=${e=>{let t=e.target.value;this.arcgisAttributeValueChange.emit({[this.attributeKey]:t?Array.isArray(t)?t:[t]:void 0})}} .placeholder=${this.attribute.description??this.messages.selectoptions} .required=${this.attribute.isRequired} .status=${this.validationMsg?"invalid":"valid"} validation-icon=exclamation-mark-triangle .validationMessage=${this.validationMsg} .value=${this.value}>${this._renderGroupedComboboxOptions()}</calcite-combobox></calcite-label>`:null}render(){switch(this.attribute.uiElement){case"checkbox":return this.renderCheckbox();case"date":return this.renderDateInput();case"multi-select":return this.renderMultiSelect();case"multi-grouped-select-nested":return this.renderMultiGroupedSelectNested();case"single-select":return this.renderSingleSelect();case"text":return this.renderTextInput();default:return i`<div>Not Implemented Yet.</div>`}}};d("arcgis-portal-classification-form-element",n);export{n as ArcgisPortalClassificationFormElement};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import c from"./453JLSJV.js";import"./5CBXYHFU.js";import"./25XJ66JO.js";import"./5YDITHQA.js";import b from"./3HINDHV7.js";import a from"./FD7SPNGP.js";import"./OUZPGGZR.js";import"./TNNIKT2R.js";import"./BKU43GE5.js";import"./4Z7OQ6QY.js";import"./K3ROLJNC.js";import"./VAFMKDDD.js";import"./JMA56SOB.js";import"./UZLQALHY.js";export default $arcgis.t(([,,a])=>{return a},a,b,c)