@duplicati/ngclient 0.0.228 → 0.0.229

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 (103) hide show
  1. package/assets/sh.woff2 +0 -0
  2. package/{chunk-CDRHCSvU.js → chunk-0sb5_LpD.js} +1 -1
  3. package/chunk-2OH1SKyQ.js +1 -0
  4. package/chunk-A5DpxPOI.js +1 -0
  5. package/{chunk-BffC_BAn.js → chunk-B-fklW6A.js} +2 -2
  6. package/{chunk-D0t-kgLy.js → chunk-B12Syddi.js} +1 -1
  7. package/chunk-B2fqvpov.js +2 -0
  8. package/{chunk-ZVDEaGd0.js → chunk-B3yuN2OH.js} +1 -1
  9. package/{chunk-BAbAUjHY.js → chunk-B6vxBiK4.js} +1 -1
  10. package/{chunk-5zEiKCqR.js → chunk-B9zNFJSv.js} +1 -1
  11. package/{chunk-CdZVal1F.js → chunk-BAZ5npJw.js} +1 -1
  12. package/{chunk-Cz4OqhOZ.js → chunk-BDXLL1lt.js} +1 -1
  13. package/chunk-BFH9sFEg.js +1 -0
  14. package/{chunk-DddAUzMY.js → chunk-BIeNnIyg.js} +1 -1
  15. package/{chunk-ClHWI9-i.js → chunk-BJ6LKfIL.js} +1 -1
  16. package/{chunk-G-I5c1Dk.js → chunk-BYHopERA.js} +1 -1
  17. package/{chunk-BKLJMYh2.js → chunk-BZYVgHEz.js} +1 -1
  18. package/chunk-BZqhgAZ-.js +2 -0
  19. package/{chunk-DNJQ-AbV.js → chunk-Bc4gFy5W.js} +1 -1
  20. package/{chunk-CeFh90sX.js → chunk-BcpsSgKo.js} +1 -1
  21. package/{chunk-BNf0YAwH.js → chunk-Bf1diO1u.js} +1 -1
  22. package/{chunk-N7vpDAsp.js → chunk-BjkwnDTL.js} +1 -1
  23. package/{chunk-B6nCQM-G.js → chunk-BoCnrrB4.js} +1 -1
  24. package/{chunk-BxxX98wy.js → chunk-BtzP4vdU.js} +1 -1
  25. package/{chunk-CnAb3OKU.js → chunk-Byb051F6.js} +1 -1
  26. package/{chunk-C08PrcBX.js → chunk-C11i_gv7.js} +1 -1
  27. package/{chunk-DuO9_dH0.js → chunk-C1t4wbdG.js} +1 -1
  28. package/{chunk-Bzp0ULy_.js → chunk-C2bnZ62D.js} +1 -1
  29. package/{chunk-Do6_xsGi.js → chunk-C9EdrQe6.js} +3 -3
  30. package/chunk-CA-ER0DL.js +2 -0
  31. package/{chunk-CxPG-KgI.js → chunk-CBdr-6_u.js} +2 -2
  32. package/{chunk-ClfSJEUJ.js → chunk-CByrJpDb.js} +1 -1
  33. package/chunk-CI78bAye.js +2 -0
  34. package/chunk-CMmgPgiU.js +2 -0
  35. package/{chunk-CMs999gl.js → chunk-COgNe44h.js} +1 -1
  36. package/{chunk-CtLFpDTP.js → chunk-CQ8rm_d9.js} +1 -1
  37. package/{chunk-B7PRtY7v.js → chunk-CRU3lYvk.js} +1 -1
  38. package/{chunk-BUF3tczf.js → chunk-CUxq_s_t.js} +8 -8
  39. package/chunk-CXEImxhE.js +1 -0
  40. package/chunk-C_JveZJH.js +1 -0
  41. package/{chunk-DtQIjLqL.js → chunk-CdKfNiwm.js} +1 -1
  42. package/{chunk-PA5BGFyW.js → chunk-CfoJuTJX.js} +1 -1
  43. package/chunk-CgYrHQGO.js +1 -0
  44. package/{chunk-wycXedbJ.js → chunk-Cs0rlpWi.js} +1 -1
  45. package/{chunk-DNSvQk_3.js → chunk-CwB_t7g-.js} +1 -1
  46. package/chunk-D0u1cyeL.js +1 -0
  47. package/chunk-D1wHRltX.js +2 -0
  48. package/{chunk-M5tldLvJ.js → chunk-D28lTX0k.js} +1 -1
  49. package/{chunk--rqB0ojD.js → chunk-D2XTQURr.js} +1 -1
  50. package/{chunk-bx0aDvCZ.js → chunk-D48AStVy.js} +1 -1
  51. package/chunk-D4UZC_u0.js +1 -0
  52. package/{chunk-DnD9XTM4.js → chunk-DC8QqmzV.js} +1 -1
  53. package/{chunk-ChwFViRh.js → chunk-DDVdXEVe.js} +1 -1
  54. package/{chunk-r4LfAQnM.js → chunk-DDo7wKQT.js} +1 -1
  55. package/{chunk-DWwNINBJ.js → chunk-DJbAxHpK.js} +1 -1
  56. package/{chunk-C-G3pKB4.js → chunk-DMJycFPC.js} +1 -1
  57. package/chunk-DP9SoPGV.js +1 -0
  58. package/{chunk-BjNuU0J_.js → chunk-DQW8lSiz.js} +1 -1
  59. package/{chunk-Dt8gZPT-.js → chunk-DQwpGI_E.js} +1 -1
  60. package/chunk-DV2SIgNN.js +2 -0
  61. package/{chunk-g_QJ3SVt.js → chunk-DVgkAgur.js} +1 -1
  62. package/{chunk-BeAI10wv.js → chunk-DVlpMN2Q.js} +1 -1
  63. package/{chunk-BYoKu9PJ.js → chunk-D_A6A07f.js} +1 -1
  64. package/chunk-D_JCqKo8.js +1 -0
  65. package/{chunk-IEVZ0UN6.js → chunk-DaIpTiYw.js} +1 -1
  66. package/{chunk-CJRbWZfg.js → chunk-DiZeSQXj.js} +1 -1
  67. package/{chunk-BOII3Fdm.js → chunk-Drc5kcUX.js} +1 -1
  68. package/{chunk-BthLY9tf.js → chunk-GVxWY6X-.js} +1 -1
  69. package/{chunk-DofVJ9gn.js → chunk-JA7rUsYF.js} +1 -1
  70. package/{chunk-SWsliUUy.js → chunk-M21GJPzH.js} +3 -3
  71. package/{chunk-CUxvfCTH.js → chunk-MvQwR7nW.js} +1 -1
  72. package/{chunk-Cc1_FUvV.js → chunk-ObToq7vh.js} +1 -1
  73. package/chunk-RKTSBnYB.js +1 -0
  74. package/{chunk-BaWD8G-f.js → chunk-SKxVK_pD.js} +1 -1
  75. package/{chunk-C4pJCbq-.js → chunk-SycscfJp.js} +1 -1
  76. package/{chunk-Cw8vFX0e.js → chunk-bgWe6t7y.js} +1 -1
  77. package/{chunk-XMwSOila.js → chunk-cLFxUFjv.js} +1 -1
  78. package/{chunk-ySdaWJYB.js → chunk-dScOwyAU.js} +1 -1
  79. package/{chunk-BqjWEFHw.js → chunk-w_Hs_Uxi.js} +1 -1
  80. package/chunk-wyer8fjS.js +1 -0
  81. package/index.html +1 -1
  82. package/locale/messages.en.json +23 -3
  83. package/locale/messages.json +23 -3
  84. package/{main-TZVLLK67.js → main-PXGZLKMN.js} +14 -14
  85. package/package.json +1 -1
  86. package/ship-ui-assets/mcp/components.json +258 -86
  87. package/chunk-B-ryE8KW.js +0 -2
  88. package/chunk-B6ugJDDx.js +0 -1
  89. package/chunk-B88MJ6Up.js +0 -1
  90. package/chunk-BCT9ajP9.js +0 -1
  91. package/chunk-BMGXb3gX.js +0 -1
  92. package/chunk-BPpheyQK.js +0 -2
  93. package/chunk-BS8yAz3P.js +0 -2
  94. package/chunk-BlIcwFlf.js +0 -1
  95. package/chunk-BuyCr2eD.js +0 -1
  96. package/chunk-CM11IMzh.js +0 -1
  97. package/chunk-CU-RYihf.js +0 -2
  98. package/chunk-CuU6b3lp.js +0 -2
  99. package/chunk-D-epCTmE.js +0 -1
  100. package/chunk-QlYDF-EM.js +0 -1
  101. package/chunk-SgcWXTYZ.js +0 -2
  102. package/chunk-birClroL.js +0 -2
  103. package/chunk-ya_5JcKA.js +0 -1
@@ -1,4 +1,4 @@
1
- import {L as L$1}from'./chunk-M5tldLvJ.js';import {T,ab as C$1,bp as je$1,bq as x$1,aG as pt$1,d as dw,R as Bl,X as XT,W as $l,V as yg,D as DE,aq as Eg,aD as zC,aj as l,ai as m,br as $p}from'./main-TZVLLK67.js';function j(){return {async:false,breaks:false,extensions:null,gfm:true,hooks:null,pedantic:false,renderer:null,silent:false,tokenizer:null,walkTokens:null}}var R=j();function Te(n){R=n;}var P={exec:()=>null};function p(n,e=""){let r=typeof n=="string"?n:n.source,s={replace:(t,l)=>{let i=typeof l=="string"?l:l.source;return i=i.replace(x.caret,"$1"),r=r.replace(t,i),s},getRegex:()=>new RegExp(r,e)};return s}var Ne=(()=>{try{return !!new RegExp("(?<=1)(?<!1)")}catch{return false}})(),x={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:n=>new RegExp(`^( {0,3}${n})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}#`),htmlBeginRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}<(?:[a-z].*>|!--)`,"i")},Oe=/^(?:[ \t]*(?:\n|$))+/,Ze=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,De=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,E=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Ge=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Q=/(?:[*+-]|\d{1,9}[.)])/,ze=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Ae=p(ze).replace(/bull/g,Q).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),He=p(ze).replace(/bull/g,Q).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),F=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,je=/^[^\n]+/,U=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Qe=p(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",U).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Fe=p(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Q).getRegex(),q="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",X=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Ue=p("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",X).replace("tag",q).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),_e=p(F).replace("hr",E).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",q).getRegex(),Xe=p(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",_e).getRegex(),W={blockquote:Xe,code:Ze,def:Qe,fences:De,heading:Ge,hr:E,html:Ue,lheading:Ae,list:Fe,newline:Oe,paragraph:_e,table:P,text:je},me=p("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",E).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",q).getRegex(),We=m(l({},W),{lheading:He,table:me,paragraph:p(F).replace("hr",E).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",me).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",q).getRegex()}),Ve=m(l({},W),{html:p(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",X).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:P,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:p(F).replace("hr",E).replace("heading",` *#{1,6} *[^
1
+ import {L as L$1}from'./chunk-D28lTX0k.js';import {T,ab as C$1,bq as je$1,br as x$1,aG as pt$1,d as dw,R as Bl,X as XT,W as $l,V as yg,D as DE,aq as Eg,aD as zC,aj as l,ai as m,bs as $p}from'./main-PXGZLKMN.js';function j(){return {async:false,breaks:false,extensions:null,gfm:true,hooks:null,pedantic:false,renderer:null,silent:false,tokenizer:null,walkTokens:null}}var R=j();function Te(n){R=n;}var P={exec:()=>null};function p(n,e=""){let r=typeof n=="string"?n:n.source,s={replace:(t,l)=>{let i=typeof l=="string"?l:l.source;return i=i.replace(x.caret,"$1"),r=r.replace(t,i),s},getRegex:()=>new RegExp(r,e)};return s}var Ne=(()=>{try{return !!new RegExp("(?<=1)(?<!1)")}catch{return false}})(),x={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:n=>new RegExp(`^( {0,3}${n})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}#`),htmlBeginRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}<(?:[a-z].*>|!--)`,"i")},Oe=/^(?:[ \t]*(?:\n|$))+/,Ze=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,De=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,E=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Ge=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Q=/(?:[*+-]|\d{1,9}[.)])/,ze=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Ae=p(ze).replace(/bull/g,Q).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),He=p(ze).replace(/bull/g,Q).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),F=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,je=/^[^\n]+/,U=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Qe=p(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",U).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Fe=p(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Q).getRegex(),q="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",X=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Ue=p("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",X).replace("tag",q).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),_e=p(F).replace("hr",E).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",q).getRegex(),Xe=p(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",_e).getRegex(),W={blockquote:Xe,code:Ze,def:Qe,fences:De,heading:Ge,hr:E,html:Ue,lheading:Ae,list:Fe,newline:Oe,paragraph:_e,table:P,text:je},me=p("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",E).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",q).getRegex(),We=m(l({},W),{lheading:He,table:me,paragraph:p(F).replace("hr",E).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",me).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",q).getRegex()}),Ve=m(l({},W),{html:p(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",X).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:P,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:p(F).replace("hr",E).replace("heading",` *#{1,6} *[^
2
2
  ]`).replace("lheading",Ae).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),Je=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Ke=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Ce=/^( {2,}|\\)\n(?!\s*$)/,Ye=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,N=/[\p{P}\p{S}]/u,V=/[\s\p{P}\p{S}]/u,Pe=/[^\s\p{P}\p{S}]/u,et=p(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,V).getRegex(),Ee=/(?!~)[\p{P}\p{S}]/u,tt=/(?!~)[\s\p{P}\p{S}]/u,rt=/(?:[^\s\p{P}\p{S}]|~)/u,nt=p(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Ne?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),ve=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,st=p(ve,"u").replace(/punct/g,N).getRegex(),it=p(ve,"u").replace(/punct/g,Ee).getRegex(),Ie="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",lt=p(Ie,"gu").replace(/notPunctSpace/g,Pe).replace(/punctSpace/g,V).replace(/punct/g,N).getRegex(),at=p(Ie,"gu").replace(/notPunctSpace/g,rt).replace(/punctSpace/g,tt).replace(/punct/g,Ee).getRegex(),ot=p("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Pe).replace(/punctSpace/g,V).replace(/punct/g,N).getRegex(),ct=p(/\\(punct)/,"gu").replace(/punct/g,N).getRegex(),ht=p(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),pt=p(X).replace("(?:-->|$)","-->").getRegex(),ut=p("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",pt).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),L=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,gt=p(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",L).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Le=p(/^!?\[(label)\]\[(ref)\]/).replace("label",L).replace("ref",U).getRegex(),Be=p(/^!?\[(ref)\](?:\[\])?/).replace("ref",U).getRegex(),kt=p("reflink|nolink(?!\\()","g").replace("reflink",Le).replace("nolink",Be).getRegex(),we=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,J={_backpedal:P,anyPunctuation:ct,autolink:ht,blockSkip:nt,br:Ce,code:Ke,del:P,emStrongLDelim:st,emStrongRDelimAst:lt,emStrongRDelimUnd:ot,escape:Je,link:gt,nolink:Be,punctuation:et,reflink:Le,reflinkSearch:kt,tag:ut,text:Ye,url:P},dt=m(l({},J),{link:p(/^!?\[(label)\]\((.*?)\)/).replace("label",L).getRegex(),reflink:p(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",L).getRegex()}),D=m(l({},J),{emStrongRDelimAst:at,emStrongLDelim:it,url:p(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",we).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:p(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",we).getRegex()}),ft=m(l({},D),{br:p(Ce).replace("{2,}","*").getRegex(),text:p(D.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),I={normal:W,gfm:We,pedantic:Ve},A={normal:J,gfm:D,breaks:ft,pedantic:dt},xt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},ye=n=>xt[n];function S(n,e){if(e){if(x.escapeTest.test(n))return n.replace(x.escapeReplace,ye)}else if(x.escapeTestNoEncode.test(n))return n.replace(x.escapeReplaceNoEncode,ye);return n}function Se(n){try{n=encodeURI(n).replace(x.percentDecode,"%");}catch{return null}return n}function $e(n,e){let r=n.replace(x.findPipe,(l,i,o)=>{let a=false,h=i;for(;--h>=0&&o[h]==="\\";)a=!a;return a?"|":" |"}),s=r.split(x.splitPipe),t=0;if(s[0].trim()||s.shift(),s.length>0&&!s.at(-1)?.trim()&&s.pop(),e)if(s.length>e)s.splice(e);else for(;s.length<e;)s.push("");for(;t<s.length;t++)s[t]=s[t].trim().replace(x.slashPipe,"|");return s}function _(n,e,r){let s=n.length;if(s===0)return "";let t=0;for(;t<s;){let l=n.charAt(s-t-1);if(l===e&&true)t++;else break}return n.slice(0,s-t)}function bt(n,e){if(n.indexOf(e[1])===-1)return -1;let r=0;for(let s=0;s<n.length;s++)if(n[s]==="\\")s++;else if(n[s]===e[0])r++;else if(n[s]===e[1]&&(r--,r<0))return s;return r>0?-2:-1}function Re(n,e,r,s,t){let l=e.href,i=e.title||null,o=n[1].replace(t.other.outputLinkReplace,"$1");s.state.inLink=true;let a={type:n[0].charAt(0)==="!"?"image":"link",raw:r,href:l,title:i,text:o,tokens:s.inlineTokens(o)};return s.state.inLink=false,a}function mt(n,e,r){let s=n.match(r.other.indentCodeCompensation);if(s===null)return e;let t=s[1];return e.split(`
3
3
  `).map(l=>{let i=l.match(r.other.beginningSpace);if(i===null)return l;let[o]=i;return o.length>=t.length?l.slice(t.length):l}).join(`
4
4
  `)}var B=class{options;rules;lexer;constructor(n){this.options=n||R;}space(n){let e=this.rules.block.newline.exec(n);if(e&&e[0].length>0)return {type:"space",raw:e[0]}}code(n){let e=this.rules.block.code.exec(n);if(e){let r=e[0].replace(this.rules.other.codeRemoveIndent,"");return {type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?r:_(r,`
@@ -1,4 +1,4 @@
1
- import {T,ae as Jr,b as g1,b7 as le$1,bw as eE,d as dw,L as oC,Y as iC,R as Bl,W as $l,F as Fg,h as bC,ad as br,bx as N,af as m1,ac as h1,N as Nt,aj as l,B as y1,U as Ue,by as ae$1,G as Ga,an as jg,V as yg,o as oT,aC as hg,D as DE,ag as zg,i as iT,I as Qg,$ as $g,K as lC,Q as Qi,s as sm,l as HC,H as Hl,j as mg,w as im,z as gg,a3 as QC,k as gT,S as Sd,n as nC,x as xd,bz as TC}from'./main-TZVLLK67.js';var pe=["triggerRef"],se=["popoverRef"],ne=["popoverContentRef"],fe=[[["","trigger",""]],[["button"]],[["","shButton",""]],"*"],ae=["[trigger]","button","[shButton]","*"];function le(s,xe){if(s&1){let i=gT();Bl(0,"div",6,1)(2,"div",7),jg("click",function(r){Sd(i);let n=nC();return xd(n.eventClose(r))}),$l(),Bl(3,"div",8,2),iC(5,3),$l()();}if(s&2){let i=nC();hg("id",i.id()+"hello"),DE(3),TC(i.menuStyle()),zg("position-anchor",i.id());}}var h=4,he=["scroll","auto"],de={width:void 0,height:void 0,closeOnButton:true,closeOnEsc:true},oe=(()=>{class s{constructor(){this.#e=T(br),this.#r=T(N),this.SUPPORTS_ANCHOR=typeof CSS<"u"&&CSS.supports("position-anchor","--abc")&&CSS.supports("anchor-name","--abc"),this.asMultiLayer=g1(false),this.asSheetOnMobile=g1(false),this.disableOpenByClick=g1(false),this.isOpen=m1(false),this.options=g1(),this.closed=h1(),this.defaultOptionMerge=Nt(()=>l(l({},de),this.options())),this.triggerRef=y1.required("triggerRef"),this.popoverRef=y1("popoverRef"),this.popoverContentRef=y1("popoverContentRef"),this.id=Ue("--"+ae$1()),this.menuStyle=Ue(null),this.openAbort=null,this.#i=null,this.openEffect=Ga(()=>{let i=this.isOpen(),e=this.popoverRef()?.nativeElement;queueMicrotask(()=>{if(!e){this.openAbort?.abort(),this.openAbort=null;return}if(i){if(this.openAbort&&this.openAbort.abort(),this.openAbort=new AbortController,this.#e.addEventListener("keydown",o=>{this.#r.matches(o,"popover.close")&&(this.defaultOptionMerge().closeOnEsc?this.isOpen.set(false):o.preventDefault());},{signal:this.openAbort?.signal}),!e.isConnected)return;e.showPopover();let r=this.#r.getShortcut("popover.close");r&&e.setAttribute("aria-keyshortcuts",this.#r.getDisplayShortcut("popover.close")||r);let n=this.asSheetOnMobile()&&window.innerWidth<=768;n&&(this.#i=this.#e.body.style.overflow,this.#e.body.style.overflow="hidden",this.menuStyle.set(null)),!this.SUPPORTS_ANCHOR&&!n&&setTimeout(()=>{this.#u(e).addEventListener("scroll",()=>this.#o(),{signal:this.openAbort?.signal}),window?.addEventListener("resize",()=>this.#o(),{signal:this.openAbort?.signal}),this.#o();});}else this.closed.emit(),e.hidePopover(),this.openAbort?.abort(),this.openAbort=null,this.asSheetOnMobile()&&this.#i!==null&&(this.#e.body.style.overflow=this.#i,this.#i=null);});});}#e;#r;#i;toggleIsOpen(i){this.disableOpenByClick()||(i.preventDefault(),i.stopPropagation(),this.isOpen.set(!this.isOpen()));}eventClose(i){this.isOpen()&&this.isOpen.set(false);}#u(i){let e=i.parentElement;for(;e;){if(he.indexOf(window?.getComputedStyle(e).overflowY)>-1&&e.scrollHeight>e.clientHeight)return e;e=e.parentElement;}return this.#e.documentElement}#t(i,e){return {left:i.left,top:i.bottom+h}}#p(i,e){return {left:i.left,top:i.top-e.height-h}}#s(i,e){return {left:i.right-e.width,top:i.bottom+h}}#n(i,e){return {left:i.right-e.width,top:i.top-e.height-h}}#f(i,e){return {left:i.right+h,top:i.top}}#a(i,e){return {left:i.left-e.width-h,top:i.top}}#l(i,e){return {left:i.right+h,top:i.top+i.height/2-e.height/2}}#h(i,e){return {left:i.left-e.width-h,top:i.top+i.height/2-e.height/2}}#d(i,e){return {left:i.right+h,top:i.bottom-e.height}}#m(i,e){return {left:i.left-e.width-h,top:i.bottom-e.height}}#c(i,e){return i.left>=0&&i.top>=0&&i.left+e.width<=window.innerWidth&&i.top+e.height<=window.innerHeight}#v(i,e){return {left:Math.max(0,Math.min(i.left,window.innerWidth-e.width)),top:Math.max(0,Math.min(i.top,window.innerHeight-e.height))}}#o(){let i=this.triggerRef()?.nativeElement.getBoundingClientRect(),e=this.popoverContentRef()?.nativeElement.getBoundingClientRect();if(!i||!e)return;let r=[this.#t,this.#p,this.#s,this.#n,this.#f,this.#a,this.#l,this.#h,this.#d,this.#m],n=[this.#f,this.#d,this.#a,this.#m,this.#l,this.#h,this.#t,this.#p,this.#s,this.#n],o=this.asMultiLayer()?n:r;for(let p of o){let y=p.call(this,i,e);if(this.#c(y,e)){this.menuStyle.set({left:y.left+"px",top:y.top+"px"});return}}let d=this.#v(o[0].call(this,i,e),e);this.menuStyle.set({left:d.left+"px",top:d.top+"px"});}ngOnDestroy(){this.openAbort?.abort(),this.openAbort=null;}static{this.\u0275fac=function(e){return new(e||s)};}static{this.\u0275cmp=dw({type:s,selectors:[["sh-popover"]],viewQuery:function(e,r){e&1&&$g(r.triggerRef,pe,5)(r.popoverRef,se,5)(r.popoverContentRef,ne,5),e&2&&lC(3);},hostVars:4,hostBindings:function(e,r){e&2&&Qg("multi-layer",r.asMultiLayer())("as-sheet",r.asSheetOnMobile());},inputs:{asMultiLayer:[1,"asMultiLayer"],asSheetOnMobile:[1,"asSheetOnMobile"],disableOpenByClick:[1,"disableOpenByClick"],isOpen:[1,"isOpen"],options:[1,"options"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:ae,decls:8,vars:4,consts:[["triggerRef",""],["popoverRef",""],["popoverContentRef",""],[1,"trigger",3,"click"],[1,"trigger-wrapper"],[1,"trigger-anchor"],["popover","manual",1,"popover"],[1,"overlay",3,"click"],[1,"popover-content"]],template:function(e,r){e&1&&(oC(fe),Bl(0,"div",3,0),jg("click",function(o){return r.toggleIsOpen(o)}),Bl(2,"div",4),iC(3),iC(4,1),iC(5,2),$l(),yg(6,"div",5),$l(),oT(7,le,6,5,"div",6)),e&2&&(hg("popovertarget",r.id()+"hello"),DE(6),zg("anchor-name",r.id()),DE(),iT(r.isOpen()?7:-1));},styles:[`sh-popover{--po-d: block;display:var(--po-d)}sh-popover.multi-layer .popover-content{position-area:right span-y-end}sh-popover.multi-layer .trigger .trigger-anchor{right:-.25rem;left:-.25rem;top:0;bottom:0}sh-popover .trigger{cursor:pointer;display:var(--po-d);position:relative}sh-popover .trigger .trigger-wrapper{display:var(--po-d)}sh-popover .trigger .trigger-wrapper:empty+*{display:inherit}sh-popover .trigger .trigger-anchor{position:absolute;inset:0;z-index:-1}sh-popover .popover{position:fixed;inset:0;width:100%;height:100%;border:0;opacity:1;background-color:transparent;z-index:-1}sh-popover .popover .overlay{width:100%;height:100%;position:absolute;top:0;left:0;background-color:transparent}sh-popover [popover]::backdrop{display:none}sh-popover .popover-content{position:fixed;margin:0;min-width:11.25rem;max-width:calc(100vw - .5rem);max-height:calc(100vh - .5rem);overflow:auto;z-index:0;background-color:var(--base-1);border:var(--border-10);border-radius:var(--shape-2);font:var(--paragraph-30);color:var(--base-8);padding:0}@supports (anchor-name: --anchor){sh-popover .popover-content{inset:auto;top:.25rem;position:fixed;position-area:bottom span-right;max-width:unset;max-height:unset;overflow:visible;position-try-fallbacks:--top-span-right,--bottom-span-left,--top-span-left,--right-span-bottom,--left-span-bottom,--right-center,--left-center,--right-span-top,--left-span-top}}@media only screen and (max-width:768px){sh-popover.as-sheet .popover{z-index:9999}sh-popover.as-sheet .popover .overlay{background-color:var(--overlay, rgba(0, 0, 0, .5))}@supports (anchor-name: --anchor){sh-popover.as-sheet .popover-content{position-area:none;position-try-fallbacks:none;inset:auto}}sh-popover.as-sheet .popover-content{position:fixed;top:auto;bottom:0;left:.5rem;right:.5rem;width:calc(100% - 1rem);max-width:unset;height:auto;max-height:calc(100vh - 5rem);border-bottom-left-radius:0;border-bottom-right-radius:0;margin:0;transform:translateY(0);display:flex;align-items:center;padding:1rem;justify-content:center}}.full-popover sh-popover .popover-content,sh-popover.full .popover-content{width:auto}@supports (anchor-name: --anchor){.full-popover sh-popover .popover-content,sh-popover.full .popover-content{left:anchor(left);right:anchor(right)}}@position-try --bottom-span-right{position-area:bottom span-right;inset:auto;top:.25rem}@position-try --bottom-span-left{position-area:bottom span-left;inset:auto;top:.25rem}@position-try --top-span-right{position-area:top span-right;inset:auto;bottom:.25rem}@position-try --top-span-left{position-area:top span-left;inset:auto;bottom:.25rem}@position-try --right-span-top{position-area:right span-top;inset:auto;left:.25rem}@position-try --left-span-top{position-area:left span-top;inset:auto;right:.25rem}@position-try --right-center{position-area:right center;inset:auto;left:.25rem}@position-try --left-center{position-area:left center;inset:auto;right:.25rem}@position-try --right-span-bottom{position-area:right span-bottom;inset:auto;left:.25rem}@position-try --left-span-bottom{position-area:left span-bottom;inset:auto;right:.25rem}
1
+ import {T,ae as Jr,b as g1,b8 as ce$1,bt as eE,d as dw,L as oC,Y as iC,R as Bl,W as $l,F as Fg,h as bC,ad as br,bu as N,af as m1,ac as h1,N as Nt,aj as l,B as y1,U as Ue,bv as le$1,G as Ga,an as jg,V as yg,o as oT,aC as hg,D as DE,ag as zg,i as iT,I as Qg,$ as $g,K as lC,Q as Qi,s as sm,l as HC,H as Hl,j as mg,w as im,z as gg,a3 as QC,k as gT,S as Sd,n as nC,x as xd,bw as TC}from'./main-PXGZLKMN.js';var pe=["triggerRef"],se=["popoverRef"],ne=["popoverContentRef"],fe=[[["","trigger",""]],[["button"]],[["","shButton",""]],"*"],ae=["[trigger]","button","[shButton]","*"];function le(s,xe){if(s&1){let i=gT();Bl(0,"div",6,1)(2,"div",7),jg("click",function(r){Sd(i);let n=nC();return xd(n.eventClose(r))}),$l(),Bl(3,"div",8,2),iC(5,3),$l()();}if(s&2){let i=nC();hg("id",i.id()+"hello"),DE(3),TC(i.menuStyle()),zg("position-anchor",i.id());}}var h=4,he=["scroll","auto"],de={width:void 0,height:void 0,closeOnButton:true,closeOnEsc:true},oe=(()=>{class s{constructor(){this.#e=T(br),this.#r=T(N),this.SUPPORTS_ANCHOR=typeof CSS<"u"&&CSS.supports("position-anchor","--abc")&&CSS.supports("anchor-name","--abc"),this.asMultiLayer=g1(false),this.asSheetOnMobile=g1(false),this.disableOpenByClick=g1(false),this.isOpen=m1(false),this.options=g1(),this.closed=h1(),this.defaultOptionMerge=Nt(()=>l(l({},de),this.options())),this.triggerRef=y1.required("triggerRef"),this.popoverRef=y1("popoverRef"),this.popoverContentRef=y1("popoverContentRef"),this.id=Ue("--"+le$1()),this.menuStyle=Ue(null),this.openAbort=null,this.#i=null,this.openEffect=Ga(()=>{let i=this.isOpen(),e=this.popoverRef()?.nativeElement;queueMicrotask(()=>{if(!e){this.openAbort?.abort(),this.openAbort=null;return}if(i){if(this.openAbort&&this.openAbort.abort(),this.openAbort=new AbortController,this.#e.addEventListener("keydown",o=>{this.#r.matches(o,"popover.close")&&(this.defaultOptionMerge().closeOnEsc?this.isOpen.set(false):o.preventDefault());},{signal:this.openAbort?.signal}),!e.isConnected)return;e.showPopover();let r=this.#r.getShortcut("popover.close");r&&e.setAttribute("aria-keyshortcuts",this.#r.getDisplayShortcut("popover.close")||r);let n=this.asSheetOnMobile()&&window.innerWidth<=768;n&&(this.#i=this.#e.body.style.overflow,this.#e.body.style.overflow="hidden",this.menuStyle.set(null)),!this.SUPPORTS_ANCHOR&&!n&&setTimeout(()=>{this.#u(e).addEventListener("scroll",()=>this.#o(),{signal:this.openAbort?.signal}),window?.addEventListener("resize",()=>this.#o(),{signal:this.openAbort?.signal}),this.#o();});}else this.closed.emit(),e.hidePopover(),this.openAbort?.abort(),this.openAbort=null,this.asSheetOnMobile()&&this.#i!==null&&(this.#e.body.style.overflow=this.#i,this.#i=null);});});}#e;#r;#i;toggleIsOpen(i){this.disableOpenByClick()||(i.preventDefault(),i.stopPropagation(),this.isOpen.set(!this.isOpen()));}eventClose(i){this.isOpen()&&this.isOpen.set(false);}#u(i){let e=i.parentElement;for(;e;){if(he.indexOf(window?.getComputedStyle(e).overflowY)>-1&&e.scrollHeight>e.clientHeight)return e;e=e.parentElement;}return this.#e.documentElement}#t(i,e){return {left:i.left,top:i.bottom+h}}#p(i,e){return {left:i.left,top:i.top-e.height-h}}#s(i,e){return {left:i.right-e.width,top:i.bottom+h}}#n(i,e){return {left:i.right-e.width,top:i.top-e.height-h}}#f(i,e){return {left:i.right+h,top:i.top}}#a(i,e){return {left:i.left-e.width-h,top:i.top}}#l(i,e){return {left:i.right+h,top:i.top+i.height/2-e.height/2}}#h(i,e){return {left:i.left-e.width-h,top:i.top+i.height/2-e.height/2}}#d(i,e){return {left:i.right+h,top:i.bottom-e.height}}#m(i,e){return {left:i.left-e.width-h,top:i.bottom-e.height}}#c(i,e){return i.left>=0&&i.top>=0&&i.left+e.width<=window.innerWidth&&i.top+e.height<=window.innerHeight}#v(i,e){return {left:Math.max(0,Math.min(i.left,window.innerWidth-e.width)),top:Math.max(0,Math.min(i.top,window.innerHeight-e.height))}}#o(){let i=this.triggerRef()?.nativeElement.getBoundingClientRect(),e=this.popoverContentRef()?.nativeElement.getBoundingClientRect();if(!i||!e)return;let r=[this.#t,this.#p,this.#s,this.#n,this.#f,this.#a,this.#l,this.#h,this.#d,this.#m],n=[this.#f,this.#d,this.#a,this.#m,this.#l,this.#h,this.#t,this.#p,this.#s,this.#n],o=this.asMultiLayer()?n:r;for(let p of o){let y=p.call(this,i,e);if(this.#c(y,e)){this.menuStyle.set({left:y.left+"px",top:y.top+"px"});return}}let d=this.#v(o[0].call(this,i,e),e);this.menuStyle.set({left:d.left+"px",top:d.top+"px"});}ngOnDestroy(){this.openAbort?.abort(),this.openAbort=null;}static{this.\u0275fac=function(e){return new(e||s)};}static{this.\u0275cmp=dw({type:s,selectors:[["sh-popover"]],viewQuery:function(e,r){e&1&&$g(r.triggerRef,pe,5)(r.popoverRef,se,5)(r.popoverContentRef,ne,5),e&2&&lC(3);},hostVars:4,hostBindings:function(e,r){e&2&&Qg("multi-layer",r.asMultiLayer())("as-sheet",r.asSheetOnMobile());},inputs:{asMultiLayer:[1,"asMultiLayer"],asSheetOnMobile:[1,"asSheetOnMobile"],disableOpenByClick:[1,"disableOpenByClick"],isOpen:[1,"isOpen"],options:[1,"options"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:ae,decls:8,vars:4,consts:[["triggerRef",""],["popoverRef",""],["popoverContentRef",""],[1,"trigger",3,"click"],[1,"trigger-wrapper"],[1,"trigger-anchor"],["popover","manual",1,"popover"],[1,"overlay",3,"click"],[1,"popover-content"]],template:function(e,r){e&1&&(oC(fe),Bl(0,"div",3,0),jg("click",function(o){return r.toggleIsOpen(o)}),Bl(2,"div",4),iC(3),iC(4,1),iC(5,2),$l(),yg(6,"div",5),$l(),oT(7,le,6,5,"div",6)),e&2&&(hg("popovertarget",r.id()+"hello"),DE(6),zg("anchor-name",r.id()),DE(),iT(r.isOpen()?7:-1));},styles:[`sh-popover{--po-d: block;display:var(--po-d)}sh-popover.multi-layer .popover-content{position-area:right span-y-end}sh-popover.multi-layer .trigger .trigger-anchor{right:-.25rem;left:-.25rem;top:0;bottom:0}sh-popover .trigger{cursor:pointer;display:var(--po-d);position:relative}sh-popover .trigger .trigger-wrapper{display:var(--po-d)}sh-popover .trigger .trigger-wrapper:empty+*{display:inherit}sh-popover .trigger .trigger-anchor{position:absolute;inset:0;z-index:-1}sh-popover .popover{position:fixed;inset:0;width:100%;height:100%;border:0;opacity:1;background-color:transparent;z-index:-1}sh-popover .popover .overlay{width:100%;height:100%;position:absolute;top:0;left:0;background-color:transparent}sh-popover [popover]::backdrop{display:none}sh-popover .popover-content{position:fixed;margin:0;min-width:11.25rem;max-width:calc(100vw - .5rem);max-height:calc(100vh - .5rem);overflow:auto;z-index:0;background-color:var(--base-1);border:var(--border-10);border-radius:var(--shape-2);font:var(--paragraph-30);color:var(--base-8);padding:0}@supports (anchor-name: --anchor){sh-popover .popover-content{inset:auto;top:.25rem;position:fixed;position-area:bottom span-right;max-width:unset;max-height:unset;overflow:visible;position-try-fallbacks:--top-span-right,--bottom-span-left,--top-span-left,--right-span-bottom,--left-span-bottom,--right-center,--left-center,--right-span-top,--left-span-top}}@media only screen and (max-width:768px){sh-popover.as-sheet .popover{z-index:9999}sh-popover.as-sheet .popover .overlay{background-color:var(--overlay, rgba(0, 0, 0, .5))}@supports (anchor-name: --anchor){sh-popover.as-sheet .popover-content{position-area:none;position-try-fallbacks:none;inset:auto}}sh-popover.as-sheet .popover-content{position:fixed;top:auto;bottom:0;left:.5rem;right:.5rem;width:calc(100% - 1rem);max-width:unset;height:auto;max-height:calc(100vh - 5rem);border-bottom-left-radius:0;border-bottom-right-radius:0;margin:0;transform:translateY(0);display:flex;align-items:center;padding:1rem;justify-content:center}}.full-popover sh-popover .popover-content,sh-popover.full .popover-content{width:auto}@supports (anchor-name: --anchor){.full-popover sh-popover .popover-content,sh-popover.full .popover-content{left:anchor(left);right:anchor(right)}}@position-try --bottom-span-right{position-area:bottom span-right;inset:auto;top:.25rem}@position-try --bottom-span-left{position-area:bottom span-left;inset:auto;top:.25rem}@position-try --top-span-right{position-area:top span-right;inset:auto;bottom:.25rem}@position-try --top-span-left{position-area:top span-left;inset:auto;bottom:.25rem}@position-try --right-span-top{position-area:right span-top;inset:auto;left:.25rem}@position-try --left-span-top{position-area:left span-top;inset:auto;right:.25rem}@position-try --right-center{position-area:right center;inset:auto;left:.25rem}@position-try --left-center{position-area:left center;inset:auto;right:.25rem}@position-try --right-span-bottom{position-area:right span-bottom;inset:auto;left:.25rem}@position-try --left-span-bottom{position-area:left span-bottom;inset:auto;right:.25rem}
2
2
  `],encapsulation:2});}}return s})();var me=[[["label"]],[["","boxPrefix",""]],[["","prefix",""]],[["","textPrefix",""]],[["input"]],[["textarea"]],[["","textSuffix",""]],[["","suffix",""]],[["","boxSuffix",""]],[["","error",""]],[["","hint",""]]],ue=["label","[boxPrefix]","[prefix]","[textPrefix]","input","textarea","[textSuffix]","[suffix]","[boxSuffix]","[error]","[hint]"],ce=[[["label"]],[["","prefix",""]],[["","textPrefix",""]],[["input"]],[["textarea"]],[["","textSuffix",""]],[["","suffix",""]],[["","popoverContent",""]],[["","error",""]],[["","hint",""]]],ve=["label","[prefix]","[textPrefix]","input","textarea","[textSuffix]","[suffix]","[popoverContent]","[error]","[hint]"],ge=()=>({closeOnButton:false,closeOnEsc:true}),be=`sh-daterange-input.small sh-form-field-popover,sh-daterange-input.small sh-form-field,sh-datepicker-input.small sh-form-field-popover,sh-datepicker-input.small sh-form-field,sh-form-field-popover.small,sh-form-field.small{--ff-space: .4375rem .625rem;--ff-input-space: .375rem .625rem;--ff-f: var(--paragraph-40B);line-height:1rem}sh-daterange-input.small sh-form-field-popover .prefix,sh-daterange-input.small sh-form-field .prefix,sh-datepicker-input.small sh-form-field-popover .prefix,sh-datepicker-input.small sh-form-field .prefix,sh-form-field-popover.small .prefix,sh-form-field.small .prefix,sh-daterange-input.small sh-form-field-popover .suffix,sh-daterange-input.small sh-form-field .suffix,sh-datepicker-input.small sh-form-field-popover .suffix,sh-datepicker-input.small sh-form-field .suffix,sh-form-field-popover.small .suffix,sh-form-field.small .suffix{line-height:1rem}sh-daterange-input.small sh-form-field-popover .prefix>sh-icon,sh-daterange-input.small sh-form-field .prefix>sh-icon,sh-datepicker-input.small sh-form-field-popover .prefix>sh-icon,sh-datepicker-input.small sh-form-field .prefix>sh-icon,sh-form-field-popover.small .prefix>sh-icon,sh-form-field.small .prefix>sh-icon,sh-daterange-input.small sh-form-field-popover .suffix>sh-icon,sh-daterange-input.small sh-form-field .suffix>sh-icon,sh-datepicker-input.small sh-form-field-popover .suffix>sh-icon,sh-datepicker-input.small sh-form-field .suffix>sh-icon,sh-form-field-popover.small .suffix>sh-icon,sh-form-field.small .suffix>sh-icon{font-size:1rem}sh-form-field-popover,sh-form-field{--ff-s: var(--shape-2);--ff-bc: var(--base-4);--ff-boxfix-bg: var(--base-2);--ff-suffix-bg: transparent;--ff-ic: var(--base-11);--ff-bg: var(--base-1);--ff-f: var(--paragraph-30B);--ff-spinner-size: 1.25rem;--ff-spinner-thickness: .125rem;--ff-space: .5625rem .75rem;--ff-input-space: .625rem .75rem;--ff-mw: auto;--ff-bs: var(--ship-form-field-shadow, none);display:flex;flex-direction:column;align-items:flex-start;position:relative;width:100%;transition:transform 125ms linear;transform:scale(1)}sh-form-field-popover:has(input[type=time]),sh-form-field:has(input[type=time]){--ff-input-space: .5625rem .75rem}sh-form-field-popover:active .input-wrap,sh-form-field:active .input-wrap{--ff-bs: 0 0 6px 0 var(--base-4)}sh-form-field-popover[readonly],sh-form-field-popover.readonly,sh-form-field-popover[disabled],sh-form-field-popover.disabled,sh-form-field-popover:has(input[disabled]),sh-form-field-popover:has(textarea[disabled]),sh-form-field[readonly],sh-form-field.readonly,sh-form-field[disabled],sh-form-field.disabled,sh-form-field:has(input[disabled]),sh-form-field:has(textarea[disabled]){pointer-events:none;-webkit-user-select:none;user-select:none;opacity:.5}sh-form-field-popover[readonly]:active,sh-form-field-popover.readonly:active,sh-form-field-popover[disabled]:active,sh-form-field-popover.disabled:active,sh-form-field-popover:has(input[disabled]):active,sh-form-field-popover:has(textarea[disabled]):active,sh-form-field[readonly]:active,sh-form-field.readonly:active,sh-form-field[disabled]:active,sh-form-field.disabled:active,sh-form-field:has(input[disabled]):active,sh-form-field:has(textarea[disabled]):active{transform:scale(1)}sh-form-field-popover.auto-width,sh-form-field.auto-width{width:initial}sh-form-field-popover.auto-width .input-wrap,sh-form-field-popover.auto-width input,sh-form-field.auto-width .input-wrap,sh-form-field.auto-width input{width:initial}sh-form-field-popover.center .input-wrap input[type=number],sh-form-field-popover.center .input-wrap input,sh-form-field.center .input-wrap input[type=number],sh-form-field.center .input-wrap input{text-align:center}sh-form-field-popover label,sh-form-field label{display:flex;align-items:center;padding-bottom:.25rem;gap:.25rem}sh-form-field-popover label sh-icon,sh-form-field label sh-icon{font-size:1rem}sh-form-field-popover .suffix,sh-form-field-popover .prefix,sh-form-field .suffix,sh-form-field .prefix{display:none;align-items:center;gap:.25rem;padding:var(--ff-space);padding-right:0;transition:background-color 125ms linear;background-color:inherit;line-height:1.25rem}sh-form-field-popover .suffix:has([boxPrefix]),sh-form-field-popover .prefix:has([boxPrefix]),sh-form-field .suffix:has([boxPrefix]),sh-form-field .prefix:has([boxPrefix]){padding:var(--ff-space);background-color:var(--ff-boxfix-bg)}sh-form-field-popover .suffix:has([boxSuffix]),sh-form-field-popover .prefix:has([boxSuffix]),sh-form-field .suffix:has([boxSuffix]),sh-form-field .prefix:has([boxSuffix]){padding:var(--ff-space);background-color:var(--ff-boxfix-bg)}sh-form-field-popover .suffix [boxPrefix],sh-form-field-popover .suffix [boxSuffix],sh-form-field-popover .prefix [boxPrefix],sh-form-field-popover .prefix [boxSuffix],sh-form-field .suffix [boxPrefix],sh-form-field .suffix [boxSuffix],sh-form-field .prefix [boxPrefix],sh-form-field .prefix [boxSuffix]{--ff-ic: var(--base-8);display:flex;align-items:center;gap:.25rem}sh-form-field-popover .suffix:not(:empty),sh-form-field-popover .prefix:not(:empty),sh-form-field .suffix:not(:empty),sh-form-field .prefix:not(:empty){display:flex}sh-form-field-popover .suffix,sh-form-field .suffix{padding:var(--ff-space);background-color:var(--ff-suffix-bg)}sh-form-field-popover .suffix:has([textsuffix]),sh-form-field .suffix:has([textsuffix]){padding-left:0}sh-form-field-popover:has(input.ng-touched.ng-invalid),sh-form-field:has(input.ng-touched.ng-invalid){--ff-ic: var(--error-8);--ff-bc: var(--error-8);--ff-boxfix-bg: var(--error-2)}sh-form-field-popover.autosize,sh-form-field.autosize{width:min-content}sh-form-field-popover.autosize .input-wrap,sh-form-field.autosize .input-wrap{height:auto}sh-form-field-popover.autosize .input-wrap textarea,sh-form-field-popover.autosize .input-wrap input,sh-form-field.autosize .input-wrap textarea,sh-form-field.autosize .input-wrap input{field-sizing:content}sh-form-field-popover .input-wrap,sh-form-field .input-wrap{display:flex;align-items:center;border:var(--border-10);border-color:var(--ff-bc);border-radius:var(--ff-s);background:var(--ff-bg);box-shadow:var(--ff-bs);overflow:hidden;transition:border-color 125ms linear,box-shadow 95ms linear;min-width:var(--ff-mw);width:100%}sh-form-field-popover .input-wrap.is-open,sh-form-field-popover .input-wrap:has(textarea:focus-visible),sh-form-field-popover .input-wrap:has(input:focus-visible),sh-form-field .input-wrap.is-open,sh-form-field .input-wrap:has(textarea:focus-visible),sh-form-field .input-wrap:has(input:focus-visible){outline:2px solid var(--primary-8);outline-offset:2px}sh-form-field-popover .input-wrap sh-popover,sh-form-field-popover .input-wrap .input,sh-form-field .input-wrap sh-popover,sh-form-field .input-wrap .input{flex:1 0;margin:var(--ff-space)}sh-form-field-popover .input-wrap textarea,sh-form-field .input-wrap textarea{resize:none;margin:.5rem 0;color:var(--base-8);field-sizing:content}sh-form-field-popover .input-wrap:has(textarea),sh-form-field .input-wrap:has(textarea){height:auto;min-width:100%;max-width:100%}sh-form-field-popover .input-wrap sh-icon,sh-form-field .input-wrap sh-icon{color:var(--ff-ic);transition:color 125ms linear}sh-form-field-popover .input-wrap sh-icon.primary,sh-form-field .input-wrap sh-icon.primary{--ff-ic: var(--primary-8)}sh-form-field-popover .input-wrap sh-icon.accent,sh-form-field .input-wrap sh-icon.accent{--ff-ic: var(--accent-8)}sh-form-field-popover .input-wrap sh-icon.warn,sh-form-field .input-wrap sh-icon.warn{--ff-ic: var(--warn-8)}sh-form-field-popover .input-wrap sh-icon.error,sh-form-field .input-wrap sh-icon.error{--ff-ic: var(--error-8)}sh-form-field-popover .input-wrap sh-icon.success,sh-form-field .input-wrap sh-icon.success{--ff-ic: var(--success-8)}sh-form-field-popover .input-wrap sh-chip sh-icon,sh-form-field .input-wrap sh-chip sh-icon{color:var(--chip-ic)}sh-form-field-popover .input-wrap sh-spinner,sh-form-field .input-wrap sh-spinner{--spinner-size: var(--ff-spinner-size);--spinner-thickness: var(--ff-spinner-thickness)}sh-form-field-popover .input-wrap textarea,sh-form-field-popover .input-wrap input,sh-form-field .input-wrap textarea,sh-form-field .input-wrap input{appearance:none;border:0;padding:0;background:transparent;font:var(--paragraph-30B);flex:1 0;color:var(--base-8);margin:var(--ff-input-space);width:100%}sh-form-field-popover .input-wrap textarea::placeholder,sh-form-field-popover .input-wrap input::placeholder,sh-form-field .input-wrap textarea::placeholder,sh-form-field .input-wrap input::placeholder{color:var(--base-6)}sh-form-field-popover .input-wrap textarea:focus,sh-form-field-popover .input-wrap input:focus,sh-form-field .input-wrap textarea:focus,sh-form-field .input-wrap input:focus{outline:none}sh-form-field-popover .input-wrap textarea[type=number],sh-form-field-popover .input-wrap input[type=number],sh-form-field .input-wrap textarea[type=number],sh-form-field .input-wrap input[type=number]{appearance:textfield;text-align:right}sh-form-field-popover .input-wrap textarea[type=number]::-webkit-outer-spin-button,sh-form-field-popover .input-wrap textarea[type=number]::-webkit-inner-spin-button,sh-form-field-popover .input-wrap input[type=number]::-webkit-outer-spin-button,sh-form-field-popover .input-wrap input[type=number]::-webkit-inner-spin-button,sh-form-field .input-wrap textarea[type=number]::-webkit-outer-spin-button,sh-form-field .input-wrap textarea[type=number]::-webkit-inner-spin-button,sh-form-field .input-wrap input[type=number]::-webkit-outer-spin-button,sh-form-field .input-wrap input[type=number]::-webkit-inner-spin-button{display:none}sh-form-field-popover .input-wrap textarea[type=number]:has(+.suffix:not(:empty)),sh-form-field-popover .input-wrap input[type=number]:has(+.suffix:not(:empty)),sh-form-field .input-wrap textarea[type=number]:has(+.suffix:not(:empty)),sh-form-field .input-wrap input[type=number]:has(+.suffix:not(:empty)){margin-right:0}sh-form-field-popover .input-wrap textarea[type=time],sh-form-field-popover .input-wrap input[type=time],sh-form-field .input-wrap textarea[type=time],sh-form-field .input-wrap input[type=time]{appearance:textfield;text-align:center;line-height:1rem}sh-form-field-popover .input-wrap textarea[type=time]::-webkit-calendar-picker-indicator,sh-form-field-popover .input-wrap input[type=time]::-webkit-calendar-picker-indicator,sh-form-field .input-wrap textarea[type=time]::-webkit-calendar-picker-indicator,sh-form-field .input-wrap input[type=time]::-webkit-calendar-picker-indicator{appearance:none;display:none}sh-form-field-popover .helpers,sh-form-field .helpers{height:1.25rem;display:flex;align-items:center;gap:.25rem;padding-top:.25rem;width:100%}sh-form-field-popover .helpers [hint],sh-form-field .helpers [hint]{color:var(--base-9)}sh-form-field-popover .helpers [hint][suffix],sh-form-field .helpers [hint][suffix]{text-align:right;width:100%}sh-form-field-popover .helpers:has(.error-wrap:not(:empty)) .hint,sh-form-field .helpers:has(.error-wrap:not(:empty)) .hint{display:none}sh-form-field-popover:has(.error-wrap:empty+.hint:empty) .helpers,sh-form-field:has(.error-wrap:empty+.hint:empty) .helpers{height:0;padding-top:0}sh-form-field-popover:has(input.ng-touched.ng-invalid) .helpers .hint,sh-form-field:has(input.ng-touched.ng-invalid) .helpers .hint{opacity:0;visibility:hidden}sh-form-field-popover .error-wrap,sh-form-field .error-wrap{color:var(--error-8);opacity:1;transition:opacity 125ms linear;position:absolute;bottom:0;left:0;right:0;width:100%}sh-form-field-popover .hint,sh-form-field .hint{display:flex;align-items:center;justify-content:space-between;width:100%;color:var(--base-8);opacity:1;transition:visibility 125ms linear,opacity 125ms linear;visibility:visible}sh-form-field-popover .hint:empty,sh-form-field .hint:empty{opacity:0}sh-form-field-popover.error,sh-form-field.error{--ff-ic: var(--error-8)}sh-form-field-popover.warning,sh-form-field.warning{--ff-ic: var(--warn-8)}sh-form-field-popover.success,sh-form-field.success{--ff-ic: var(--success-8)}sh-form-field-popover.horizontal,sh-form-field.horizontal{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:0 1rem}sh-form-field-popover.horizontal label,sh-form-field.horizontal label{padding-bottom:0;margin-bottom:0;grid-column:1}sh-form-field-popover.horizontal .input-wrap,sh-form-field.horizontal .input-wrap{grid-column:2}sh-form-field-popover.horizontal .helpers,sh-form-field.horizontal .helpers{grid-column:2}
3
- `,Fe=(()=>{class s{#e;onClick(){this.#e.nativeElement.querySelector("input")&&this.#e.nativeElement.querySelector("input").focus(),this.#e.nativeElement.querySelector("textarea")&&this.#e.nativeElement.querySelector("textarea").focus();}constructor(){this.#e=T(Jr),this.color=g1(null),this.variant=g1(null),this.size=g1(null),this.readonly=g1(false),this.hostClasses=le$1("formField",{color:this.color,variant:this.variant,size:this.size,readonly:this.readonly}),eE(()=>{let i=this.#e.nativeElement,e=i.querySelector("input")||i.querySelector("textarea"),r=i.querySelector("label"),n=i.querySelector("[error]"),o=i.querySelector("[hint]");if(e){e.id||(e.id=`sh-input-${Math.random().toString(36).substring(2,9)}`),r&&!r.getAttribute("for")&&r.setAttribute("for",e.id);let m=[];n&&(n.id||(n.id=`sh-error-${Math.random().toString(36).substring(2,9)}`),m.push(n.id)),o&&(o.id||(o.id=`sh-hint-${Math.random().toString(36).substring(2,9)}`),m.push(o.id)),m.length>0&&!e.hasAttribute("aria-describedby")&&e.setAttribute("aria-describedby",m.join(" "));}let d=typeof CSS<"u"&&CSS.supports("field-sizing","content"),p=this.#e.nativeElement.querySelector("textarea");if(!d&&p!==null){let m=function(){p.style.height="auto",p.style.height=p.scrollHeight+"px";},g=function(){setTimeout(m,0);};p.addEventListener("change",m),p.addEventListener("cut",g),p.addEventListener("paste",g),p.addEventListener("drop",g),p.addEventListener("keydown",g),p.focus(),p.select(),m();}});}static{this.\u0275fac=function(e){return new(e||s)};}static{this.\u0275cmp=dw({type:s,selectors:[["sh-form-field"]],hostVars:2,hostBindings:function(e,r){e&1&&Fg("click",function(){return r.onClick()}),e&2&&bC(r.hostClasses());},inputs:{color:[1,"color"],variant:[1,"variant"],size:[1,"size"],readonly:[1,"readonly"]},ngContentSelectors:ue,decls:17,vars:0,consts:[[1,"input-wrap"],[1,"prefix"],[1,"suffix"],[1,"helpers"],[1,"error-wrap"],[1,"hint"]],template:function(e,r){e&1&&(oC(me),iC(0),Bl(1,"div",0)(2,"div",1),iC(3,1),iC(4,2),iC(5,3),$l(),iC(6,4),iC(7,5),Bl(8,"div",2),iC(9,6),iC(10,7),iC(11,8),$l()(),Bl(12,"div",3)(13,"div",4),iC(14,9),$l(),Bl(15,"div",5),iC(16,10),$l()());},styles:[`sh-daterange-input.small sh-form-field-popover,sh-daterange-input.small sh-form-field,sh-datepicker-input.small sh-form-field-popover,sh-datepicker-input.small sh-form-field,sh-form-field-popover.small,sh-form-field.small{--ff-space: .4375rem .625rem;--ff-input-space: .375rem .625rem;--ff-f: var(--paragraph-40B);line-height:1rem}sh-daterange-input.small sh-form-field-popover .prefix,sh-daterange-input.small sh-form-field .prefix,sh-datepicker-input.small sh-form-field-popover .prefix,sh-datepicker-input.small sh-form-field .prefix,sh-form-field-popover.small .prefix,sh-form-field.small .prefix,sh-daterange-input.small sh-form-field-popover .suffix,sh-daterange-input.small sh-form-field .suffix,sh-datepicker-input.small sh-form-field-popover .suffix,sh-datepicker-input.small sh-form-field .suffix,sh-form-field-popover.small .suffix,sh-form-field.small .suffix{line-height:1rem}sh-daterange-input.small sh-form-field-popover .prefix>sh-icon,sh-daterange-input.small sh-form-field .prefix>sh-icon,sh-datepicker-input.small sh-form-field-popover .prefix>sh-icon,sh-datepicker-input.small sh-form-field .prefix>sh-icon,sh-form-field-popover.small .prefix>sh-icon,sh-form-field.small .prefix>sh-icon,sh-daterange-input.small sh-form-field-popover .suffix>sh-icon,sh-daterange-input.small sh-form-field .suffix>sh-icon,sh-datepicker-input.small sh-form-field-popover .suffix>sh-icon,sh-datepicker-input.small sh-form-field .suffix>sh-icon,sh-form-field-popover.small .suffix>sh-icon,sh-form-field.small .suffix>sh-icon{font-size:1rem}sh-form-field-popover,sh-form-field{--ff-s: var(--shape-2);--ff-bc: var(--base-4);--ff-boxfix-bg: var(--base-2);--ff-suffix-bg: transparent;--ff-ic: var(--base-11);--ff-bg: var(--base-1);--ff-f: var(--paragraph-30B);--ff-spinner-size: 1.25rem;--ff-spinner-thickness: .125rem;--ff-space: .5625rem .75rem;--ff-input-space: .625rem .75rem;--ff-mw: auto;--ff-bs: var(--ship-form-field-shadow, none);display:flex;flex-direction:column;align-items:flex-start;position:relative;width:100%;transition:transform 125ms linear;transform:scale(1)}sh-form-field-popover:has(input[type=time]),sh-form-field:has(input[type=time]){--ff-input-space: .5625rem .75rem}sh-form-field-popover:active .input-wrap,sh-form-field:active .input-wrap{--ff-bs: 0 0 6px 0 var(--base-4)}sh-form-field-popover[readonly],sh-form-field-popover.readonly,sh-form-field-popover[disabled],sh-form-field-popover.disabled,sh-form-field-popover:has(input[disabled]),sh-form-field-popover:has(textarea[disabled]),sh-form-field[readonly],sh-form-field.readonly,sh-form-field[disabled],sh-form-field.disabled,sh-form-field:has(input[disabled]),sh-form-field:has(textarea[disabled]){pointer-events:none;-webkit-user-select:none;user-select:none;opacity:.5}sh-form-field-popover[readonly]:active,sh-form-field-popover.readonly:active,sh-form-field-popover[disabled]:active,sh-form-field-popover.disabled:active,sh-form-field-popover:has(input[disabled]):active,sh-form-field-popover:has(textarea[disabled]):active,sh-form-field[readonly]:active,sh-form-field.readonly:active,sh-form-field[disabled]:active,sh-form-field.disabled:active,sh-form-field:has(input[disabled]):active,sh-form-field:has(textarea[disabled]):active{transform:scale(1)}sh-form-field-popover.auto-width,sh-form-field.auto-width{width:initial}sh-form-field-popover.auto-width .input-wrap,sh-form-field-popover.auto-width input,sh-form-field.auto-width .input-wrap,sh-form-field.auto-width input{width:initial}sh-form-field-popover.center .input-wrap input[type=number],sh-form-field-popover.center .input-wrap input,sh-form-field.center .input-wrap input[type=number],sh-form-field.center .input-wrap input{text-align:center}sh-form-field-popover label,sh-form-field label{display:flex;align-items:center;padding-bottom:.25rem;gap:.25rem}sh-form-field-popover label sh-icon,sh-form-field label sh-icon{font-size:1rem}sh-form-field-popover .suffix,sh-form-field-popover .prefix,sh-form-field .suffix,sh-form-field .prefix{display:none;align-items:center;gap:.25rem;padding:var(--ff-space);padding-right:0;transition:background-color 125ms linear;background-color:inherit;line-height:1.25rem}sh-form-field-popover .suffix:has([boxPrefix]),sh-form-field-popover .prefix:has([boxPrefix]),sh-form-field .suffix:has([boxPrefix]),sh-form-field .prefix:has([boxPrefix]){padding:var(--ff-space);background-color:var(--ff-boxfix-bg)}sh-form-field-popover .suffix:has([boxSuffix]),sh-form-field-popover .prefix:has([boxSuffix]),sh-form-field .suffix:has([boxSuffix]),sh-form-field .prefix:has([boxSuffix]){padding:var(--ff-space);background-color:var(--ff-boxfix-bg)}sh-form-field-popover .suffix [boxPrefix],sh-form-field-popover .suffix [boxSuffix],sh-form-field-popover .prefix [boxPrefix],sh-form-field-popover .prefix [boxSuffix],sh-form-field .suffix [boxPrefix],sh-form-field .suffix [boxSuffix],sh-form-field .prefix [boxPrefix],sh-form-field .prefix [boxSuffix]{--ff-ic: var(--base-8);display:flex;align-items:center;gap:.25rem}sh-form-field-popover .suffix:not(:empty),sh-form-field-popover .prefix:not(:empty),sh-form-field .suffix:not(:empty),sh-form-field .prefix:not(:empty){display:flex}sh-form-field-popover .suffix,sh-form-field .suffix{padding:var(--ff-space);background-color:var(--ff-suffix-bg)}sh-form-field-popover .suffix:has([textsuffix]),sh-form-field .suffix:has([textsuffix]){padding-left:0}sh-form-field-popover:has(input.ng-touched.ng-invalid),sh-form-field:has(input.ng-touched.ng-invalid){--ff-ic: var(--error-8);--ff-bc: var(--error-8);--ff-boxfix-bg: var(--error-2)}sh-form-field-popover.autosize,sh-form-field.autosize{width:min-content}sh-form-field-popover.autosize .input-wrap,sh-form-field.autosize .input-wrap{height:auto}sh-form-field-popover.autosize .input-wrap textarea,sh-form-field-popover.autosize .input-wrap input,sh-form-field.autosize .input-wrap textarea,sh-form-field.autosize .input-wrap input{field-sizing:content}sh-form-field-popover .input-wrap,sh-form-field .input-wrap{display:flex;align-items:center;border:var(--border-10);border-color:var(--ff-bc);border-radius:var(--ff-s);background:var(--ff-bg);box-shadow:var(--ff-bs);overflow:hidden;transition:border-color 125ms linear,box-shadow 95ms linear;min-width:var(--ff-mw);width:100%}sh-form-field-popover .input-wrap.is-open,sh-form-field-popover .input-wrap:has(textarea:focus-visible),sh-form-field-popover .input-wrap:has(input:focus-visible),sh-form-field .input-wrap.is-open,sh-form-field .input-wrap:has(textarea:focus-visible),sh-form-field .input-wrap:has(input:focus-visible){outline:2px solid var(--primary-8);outline-offset:2px}sh-form-field-popover .input-wrap sh-popover,sh-form-field-popover .input-wrap .input,sh-form-field .input-wrap sh-popover,sh-form-field .input-wrap .input{flex:1 0;margin:var(--ff-space)}sh-form-field-popover .input-wrap textarea,sh-form-field .input-wrap textarea{resize:none;margin:.5rem 0;color:var(--base-8);field-sizing:content}sh-form-field-popover .input-wrap:has(textarea),sh-form-field .input-wrap:has(textarea){height:auto;min-width:100%;max-width:100%}sh-form-field-popover .input-wrap sh-icon,sh-form-field .input-wrap sh-icon{color:var(--ff-ic);transition:color 125ms linear}sh-form-field-popover .input-wrap sh-icon.primary,sh-form-field .input-wrap sh-icon.primary{--ff-ic: var(--primary-8)}sh-form-field-popover .input-wrap sh-icon.accent,sh-form-field .input-wrap sh-icon.accent{--ff-ic: var(--accent-8)}sh-form-field-popover .input-wrap sh-icon.warn,sh-form-field .input-wrap sh-icon.warn{--ff-ic: var(--warn-8)}sh-form-field-popover .input-wrap sh-icon.error,sh-form-field .input-wrap sh-icon.error{--ff-ic: var(--error-8)}sh-form-field-popover .input-wrap sh-icon.success,sh-form-field .input-wrap sh-icon.success{--ff-ic: var(--success-8)}sh-form-field-popover .input-wrap sh-chip sh-icon,sh-form-field .input-wrap sh-chip sh-icon{color:var(--chip-ic)}sh-form-field-popover .input-wrap sh-spinner,sh-form-field .input-wrap sh-spinner{--spinner-size: var(--ff-spinner-size);--spinner-thickness: var(--ff-spinner-thickness)}sh-form-field-popover .input-wrap textarea,sh-form-field-popover .input-wrap input,sh-form-field .input-wrap textarea,sh-form-field .input-wrap input{appearance:none;border:0;padding:0;background:transparent;font:var(--paragraph-30B);flex:1 0;color:var(--base-8);margin:var(--ff-input-space);width:100%}sh-form-field-popover .input-wrap textarea::placeholder,sh-form-field-popover .input-wrap input::placeholder,sh-form-field .input-wrap textarea::placeholder,sh-form-field .input-wrap input::placeholder{color:var(--base-6)}sh-form-field-popover .input-wrap textarea:focus,sh-form-field-popover .input-wrap input:focus,sh-form-field .input-wrap textarea:focus,sh-form-field .input-wrap input:focus{outline:none}sh-form-field-popover .input-wrap textarea[type=number],sh-form-field-popover .input-wrap input[type=number],sh-form-field .input-wrap textarea[type=number],sh-form-field .input-wrap input[type=number]{appearance:textfield;text-align:right}sh-form-field-popover .input-wrap textarea[type=number]::-webkit-outer-spin-button,sh-form-field-popover .input-wrap textarea[type=number]::-webkit-inner-spin-button,sh-form-field-popover .input-wrap input[type=number]::-webkit-outer-spin-button,sh-form-field-popover .input-wrap input[type=number]::-webkit-inner-spin-button,sh-form-field .input-wrap textarea[type=number]::-webkit-outer-spin-button,sh-form-field .input-wrap textarea[type=number]::-webkit-inner-spin-button,sh-form-field .input-wrap input[type=number]::-webkit-outer-spin-button,sh-form-field .input-wrap input[type=number]::-webkit-inner-spin-button{display:none}sh-form-field-popover .input-wrap textarea[type=number]:has(+.suffix:not(:empty)),sh-form-field-popover .input-wrap input[type=number]:has(+.suffix:not(:empty)),sh-form-field .input-wrap textarea[type=number]:has(+.suffix:not(:empty)),sh-form-field .input-wrap input[type=number]:has(+.suffix:not(:empty)){margin-right:0}sh-form-field-popover .input-wrap textarea[type=time],sh-form-field-popover .input-wrap input[type=time],sh-form-field .input-wrap textarea[type=time],sh-form-field .input-wrap input[type=time]{appearance:textfield;text-align:center;line-height:1rem}sh-form-field-popover .input-wrap textarea[type=time]::-webkit-calendar-picker-indicator,sh-form-field-popover .input-wrap input[type=time]::-webkit-calendar-picker-indicator,sh-form-field .input-wrap textarea[type=time]::-webkit-calendar-picker-indicator,sh-form-field .input-wrap input[type=time]::-webkit-calendar-picker-indicator{appearance:none;display:none}sh-form-field-popover .helpers,sh-form-field .helpers{height:1.25rem;display:flex;align-items:center;gap:.25rem;padding-top:.25rem;width:100%}sh-form-field-popover .helpers [hint],sh-form-field .helpers [hint]{color:var(--base-9)}sh-form-field-popover .helpers [hint][suffix],sh-form-field .helpers [hint][suffix]{text-align:right;width:100%}sh-form-field-popover .helpers:has(.error-wrap:not(:empty)) .hint,sh-form-field .helpers:has(.error-wrap:not(:empty)) .hint{display:none}sh-form-field-popover:has(.error-wrap:empty+.hint:empty) .helpers,sh-form-field:has(.error-wrap:empty+.hint:empty) .helpers{height:0;padding-top:0}sh-form-field-popover:has(input.ng-touched.ng-invalid) .helpers .hint,sh-form-field:has(input.ng-touched.ng-invalid) .helpers .hint{opacity:0;visibility:hidden}sh-form-field-popover .error-wrap,sh-form-field .error-wrap{color:var(--error-8);opacity:1;transition:opacity 125ms linear;position:absolute;bottom:0;left:0;right:0;width:100%}sh-form-field-popover .hint,sh-form-field .hint{display:flex;align-items:center;justify-content:space-between;width:100%;color:var(--base-8);opacity:1;transition:visibility 125ms linear,opacity 125ms linear;visibility:visible}sh-form-field-popover .hint:empty,sh-form-field .hint:empty{opacity:0}sh-form-field-popover.error,sh-form-field.error{--ff-ic: var(--error-8)}sh-form-field-popover.warning,sh-form-field.warning{--ff-ic: var(--warn-8)}sh-form-field-popover.success,sh-form-field.success{--ff-ic: var(--success-8)}sh-form-field-popover.horizontal,sh-form-field.horizontal{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:0 1rem}sh-form-field-popover.horizontal label,sh-form-field.horizontal label{padding-bottom:0;margin-bottom:0;grid-column:1}sh-form-field-popover.horizontal .input-wrap,sh-form-field.horizontal .input-wrap{grid-column:2}sh-form-field-popover.horizontal .helpers,sh-form-field.horizontal .helpers{grid-column:2}
4
- `],encapsulation:2});}}return s})(),Ae=(()=>{class s{constructor(){this.#e=T(Jr),this.isOpen=m1(false),this.closed=h1(),this.color=g1(null),this.variant=g1(null),this.size=g1(null),this.readonly=g1(false),this.hostClasses=le$1("formField",{color:this.color,variant:this.variant,size:this.size,readonly:this.readonly});}#e;onClick(i){i.target.closest(".input-wrap")&&(this.#e.nativeElement.querySelector("input")&&this.#e.nativeElement.querySelector("input").focus(),this.#e.nativeElement.querySelector("textarea")&&this.#e.nativeElement.querySelector("textarea").focus());}close(){this.closed.emit();}ngOnInit(){let i=typeof CSS<"u"&&CSS.supports("field-sizing","content"),e=this.#e.nativeElement.querySelector("textarea");if(!i&&e!==null){let d=function(){o.style.height="auto",o.style.height=o.scrollHeight+"px";},p=function(){setTimeout(d,0);};let o=this.#e.nativeElement.querySelector("textarea");o&&(o.addEventListener("change",d),o.addEventListener("cut",p),o.addEventListener("paste",p),o.addEventListener("drop",p),o.addEventListener("keydown",p),o.focus(),o.select(),d());}}static{this.\u0275fac=function(e){return new(e||s)};}static{this.\u0275cmp=dw({type:s,selectors:[["sh-form-field-popover"]],hostVars:2,hostBindings:function(e,r){e&1&&Fg("click",function(o){return r.onClick(o)}),e&2&&bC(r.hostClasses());},inputs:{isOpen:[1,"isOpen"],color:[1,"color"],variant:[1,"variant"],size:[1,"size"],readonly:[1,"readonly"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:ve,decls:18,vars:6,consts:[[3,"isOpenChange","closed","isOpen","asSheetOnMobile","options"],["trigger","",1,"input-wrap"],[1,"prefix"],[1,"prefix-space"],[1,"suffix-space"],[1,"helpers"],[1,"error-wrap"],[1,"hint"]],template:function(e,r){e&1&&(oC(ce),iC(0),Qi(1,"sh-popover",0),sm("isOpenChange",function(o){return HC(r.isOpen,o)||(r.isOpen=o),o}),Fg("closed",function(){return r.close()}),Qi(2,"div",1)(3,"div",2),iC(4,1),iC(5,2),Hl(),mg(6,"div",3),iC(7,3),iC(8,4),iC(9,5),mg(10,"div",4),iC(11,6),Hl(),iC(12,7),Hl(),Qi(13,"div",5)(14,"div",6),iC(15,8),Hl(),Qi(16,"div",7),iC(17,9),Hl()()),e&2&&(DE(),im("isOpen",r.isOpen),gg("asSheetOnMobile",true)("options",QC(5,ge)),DE(),Qg("is-open",r.isOpen()));},dependencies:[oe],styles:[be],encapsulation:2});}}return s})();export{Ae as A,Fe as F,oe as o};
3
+ `,Fe=(()=>{class s{#e;onClick(){this.#e.nativeElement.querySelector("input")&&this.#e.nativeElement.querySelector("input").focus(),this.#e.nativeElement.querySelector("textarea")&&this.#e.nativeElement.querySelector("textarea").focus();}constructor(){this.#e=T(Jr),this.color=g1(null),this.variant=g1(null),this.size=g1(null),this.readonly=g1(false),this.hostClasses=ce$1("formField",{color:this.color,variant:this.variant,size:this.size,readonly:this.readonly}),eE(()=>{let i=this.#e.nativeElement,e=i.querySelector("input")||i.querySelector("textarea"),r=i.querySelector("label"),n=i.querySelector("[error]"),o=i.querySelector("[hint]");if(e){e.id||(e.id=`sh-input-${Math.random().toString(36).substring(2,9)}`),r&&!r.getAttribute("for")&&r.setAttribute("for",e.id);let m=[];n&&(n.id||(n.id=`sh-error-${Math.random().toString(36).substring(2,9)}`),m.push(n.id)),o&&(o.id||(o.id=`sh-hint-${Math.random().toString(36).substring(2,9)}`),m.push(o.id)),m.length>0&&!e.hasAttribute("aria-describedby")&&e.setAttribute("aria-describedby",m.join(" "));}let d=typeof CSS<"u"&&CSS.supports("field-sizing","content"),p=this.#e.nativeElement.querySelector("textarea");if(!d&&p!==null){let m=function(){p.style.height="auto",p.style.height=p.scrollHeight+"px";},g=function(){setTimeout(m,0);};p.addEventListener("change",m),p.addEventListener("cut",g),p.addEventListener("paste",g),p.addEventListener("drop",g),p.addEventListener("keydown",g),p.focus(),p.select(),m();}});}static{this.\u0275fac=function(e){return new(e||s)};}static{this.\u0275cmp=dw({type:s,selectors:[["sh-form-field"]],hostVars:2,hostBindings:function(e,r){e&1&&Fg("click",function(){return r.onClick()}),e&2&&bC(r.hostClasses());},inputs:{color:[1,"color"],variant:[1,"variant"],size:[1,"size"],readonly:[1,"readonly"]},ngContentSelectors:ue,decls:17,vars:0,consts:[[1,"input-wrap"],[1,"prefix"],[1,"suffix"],[1,"helpers"],[1,"error-wrap"],[1,"hint"]],template:function(e,r){e&1&&(oC(me),iC(0),Bl(1,"div",0)(2,"div",1),iC(3,1),iC(4,2),iC(5,3),$l(),iC(6,4),iC(7,5),Bl(8,"div",2),iC(9,6),iC(10,7),iC(11,8),$l()(),Bl(12,"div",3)(13,"div",4),iC(14,9),$l(),Bl(15,"div",5),iC(16,10),$l()());},styles:[`sh-daterange-input.small sh-form-field-popover,sh-daterange-input.small sh-form-field,sh-datepicker-input.small sh-form-field-popover,sh-datepicker-input.small sh-form-field,sh-form-field-popover.small,sh-form-field.small{--ff-space: .4375rem .625rem;--ff-input-space: .375rem .625rem;--ff-f: var(--paragraph-40B);line-height:1rem}sh-daterange-input.small sh-form-field-popover .prefix,sh-daterange-input.small sh-form-field .prefix,sh-datepicker-input.small sh-form-field-popover .prefix,sh-datepicker-input.small sh-form-field .prefix,sh-form-field-popover.small .prefix,sh-form-field.small .prefix,sh-daterange-input.small sh-form-field-popover .suffix,sh-daterange-input.small sh-form-field .suffix,sh-datepicker-input.small sh-form-field-popover .suffix,sh-datepicker-input.small sh-form-field .suffix,sh-form-field-popover.small .suffix,sh-form-field.small .suffix{line-height:1rem}sh-daterange-input.small sh-form-field-popover .prefix>sh-icon,sh-daterange-input.small sh-form-field .prefix>sh-icon,sh-datepicker-input.small sh-form-field-popover .prefix>sh-icon,sh-datepicker-input.small sh-form-field .prefix>sh-icon,sh-form-field-popover.small .prefix>sh-icon,sh-form-field.small .prefix>sh-icon,sh-daterange-input.small sh-form-field-popover .suffix>sh-icon,sh-daterange-input.small sh-form-field .suffix>sh-icon,sh-datepicker-input.small sh-form-field-popover .suffix>sh-icon,sh-datepicker-input.small sh-form-field .suffix>sh-icon,sh-form-field-popover.small .suffix>sh-icon,sh-form-field.small .suffix>sh-icon{font-size:1rem}sh-form-field-popover,sh-form-field{--ff-s: var(--shape-2);--ff-bc: var(--base-4);--ff-boxfix-bg: var(--base-2);--ff-suffix-bg: transparent;--ff-ic: var(--base-11);--ff-bg: var(--base-1);--ff-f: var(--paragraph-30B);--ff-spinner-size: 1.25rem;--ff-spinner-thickness: .125rem;--ff-space: .5625rem .75rem;--ff-input-space: .625rem .75rem;--ff-mw: auto;--ff-bs: var(--ship-form-field-shadow, none);display:flex;flex-direction:column;align-items:flex-start;position:relative;width:100%;transition:transform 125ms linear;transform:scale(1)}sh-form-field-popover:has(input[type=time]),sh-form-field:has(input[type=time]){--ff-input-space: .5625rem .75rem}sh-form-field-popover:active .input-wrap,sh-form-field:active .input-wrap{--ff-bs: 0 0 6px 0 var(--base-4)}sh-form-field-popover[readonly],sh-form-field-popover.readonly,sh-form-field-popover[disabled],sh-form-field-popover.disabled,sh-form-field-popover:has(input[disabled]),sh-form-field-popover:has(textarea[disabled]),sh-form-field[readonly],sh-form-field.readonly,sh-form-field[disabled],sh-form-field.disabled,sh-form-field:has(input[disabled]),sh-form-field:has(textarea[disabled]){pointer-events:none;-webkit-user-select:none;user-select:none;opacity:.5}sh-form-field-popover[readonly]:active,sh-form-field-popover.readonly:active,sh-form-field-popover[disabled]:active,sh-form-field-popover.disabled:active,sh-form-field-popover:has(input[disabled]):active,sh-form-field-popover:has(textarea[disabled]):active,sh-form-field[readonly]:active,sh-form-field.readonly:active,sh-form-field[disabled]:active,sh-form-field.disabled:active,sh-form-field:has(input[disabled]):active,sh-form-field:has(textarea[disabled]):active{transform:scale(1)}sh-form-field-popover.auto-width,sh-form-field.auto-width{width:initial}sh-form-field-popover.auto-width .input-wrap,sh-form-field-popover.auto-width input,sh-form-field.auto-width .input-wrap,sh-form-field.auto-width input{width:initial}sh-form-field-popover.center .input-wrap input[type=number],sh-form-field-popover.center .input-wrap input,sh-form-field.center .input-wrap input[type=number],sh-form-field.center .input-wrap input{text-align:center}sh-form-field-popover label,sh-form-field label{display:flex;align-items:center;padding-bottom:.25rem;gap:.25rem}sh-form-field-popover label sh-icon,sh-form-field label sh-icon{font-size:1rem}sh-form-field-popover .suffix,sh-form-field-popover .prefix,sh-form-field .suffix,sh-form-field .prefix{display:none;align-items:center;gap:.25rem;padding:var(--ff-space);padding-right:0;transition:background-color 125ms linear;background-color:inherit;line-height:1.25rem}sh-form-field-popover .suffix:has([boxPrefix]),sh-form-field-popover .prefix:has([boxPrefix]),sh-form-field .suffix:has([boxPrefix]),sh-form-field .prefix:has([boxPrefix]){padding:var(--ff-space);background-color:var(--ff-boxfix-bg)}sh-form-field-popover .suffix:has([boxSuffix]),sh-form-field-popover .prefix:has([boxSuffix]),sh-form-field .suffix:has([boxSuffix]),sh-form-field .prefix:has([boxSuffix]){padding:var(--ff-space);background-color:var(--ff-boxfix-bg)}sh-form-field-popover .suffix [boxPrefix],sh-form-field-popover .suffix [boxSuffix],sh-form-field-popover .prefix [boxPrefix],sh-form-field-popover .prefix [boxSuffix],sh-form-field .suffix [boxPrefix],sh-form-field .suffix [boxSuffix],sh-form-field .prefix [boxPrefix],sh-form-field .prefix [boxSuffix]{--ff-ic: var(--base-8);display:flex;align-items:center;gap:.25rem}sh-form-field-popover .suffix:not(:empty),sh-form-field-popover .prefix:not(:empty),sh-form-field .suffix:not(:empty),sh-form-field .prefix:not(:empty){display:flex}sh-form-field-popover .suffix,sh-form-field .suffix{padding:var(--ff-space);background-color:var(--ff-suffix-bg)}sh-form-field-popover .suffix:has([textsuffix]),sh-form-field .suffix:has([textsuffix]){padding-left:0}sh-form-field-popover:has(input.ng-touched.ng-invalid),sh-form-field:has(input.ng-touched.ng-invalid){--ff-ic: var(--error-8);--ff-bc: var(--error-8);--ff-boxfix-bg: var(--error-2)}sh-form-field-popover.autosize,sh-form-field.autosize{width:min-content}sh-form-field-popover.autosize .input-wrap,sh-form-field.autosize .input-wrap{height:auto}sh-form-field-popover.autosize .input-wrap textarea,sh-form-field-popover.autosize .input-wrap input,sh-form-field.autosize .input-wrap textarea,sh-form-field.autosize .input-wrap input{field-sizing:content}sh-form-field-popover .input-wrap,sh-form-field .input-wrap{display:flex;align-items:center;border:var(--border-10);border-color:var(--ff-bc);border-radius:var(--ff-s);background:var(--ff-bg);box-shadow:var(--ff-bs);overflow:hidden;transition:border-color 125ms linear,box-shadow 95ms linear;min-width:var(--ff-mw);width:100%}sh-form-field-popover .input-wrap.is-open,sh-form-field-popover .input-wrap:has(textarea:focus-visible),sh-form-field-popover .input-wrap:has(input:focus-visible),sh-form-field .input-wrap.is-open,sh-form-field .input-wrap:has(textarea:focus-visible),sh-form-field .input-wrap:has(input:focus-visible){outline:2px solid var(--primary-8);outline-offset:2px}sh-form-field-popover .input-wrap sh-popover,sh-form-field-popover .input-wrap .input,sh-form-field .input-wrap sh-popover,sh-form-field .input-wrap .input{flex:1 0;margin:var(--ff-space)}sh-form-field-popover .input-wrap textarea,sh-form-field .input-wrap textarea{resize:none;margin:.5rem 0;color:var(--base-8);field-sizing:content}sh-form-field-popover .input-wrap:has(textarea),sh-form-field .input-wrap:has(textarea){height:auto;min-width:100%;max-width:100%}sh-form-field-popover .input-wrap sh-icon,sh-form-field .input-wrap sh-icon{color:var(--ff-ic);transition:color 125ms linear}sh-form-field-popover .input-wrap sh-icon.primary,sh-form-field .input-wrap sh-icon.primary{--ff-ic: var(--primary-8)}sh-form-field-popover .input-wrap sh-icon.accent,sh-form-field .input-wrap sh-icon.accent{--ff-ic: var(--accent-8)}sh-form-field-popover .input-wrap sh-icon.warn,sh-form-field .input-wrap sh-icon.warn{--ff-ic: var(--warn-8)}sh-form-field-popover .input-wrap sh-icon.error,sh-form-field .input-wrap sh-icon.error{--ff-ic: var(--error-8)}sh-form-field-popover .input-wrap sh-icon.success,sh-form-field .input-wrap sh-icon.success{--ff-ic: var(--success-8)}sh-form-field-popover .input-wrap sh-chip sh-icon,sh-form-field .input-wrap sh-chip sh-icon{color:var(--chip-ic)}sh-form-field-popover .input-wrap sh-spinner,sh-form-field .input-wrap sh-spinner{--spinner-size: var(--ff-spinner-size);--spinner-thickness: var(--ff-spinner-thickness)}sh-form-field-popover .input-wrap textarea,sh-form-field-popover .input-wrap input,sh-form-field .input-wrap textarea,sh-form-field .input-wrap input{appearance:none;border:0;padding:0;background:transparent;font:var(--paragraph-30B);flex:1 0;color:var(--base-8);margin:var(--ff-input-space);width:100%}sh-form-field-popover .input-wrap textarea::placeholder,sh-form-field-popover .input-wrap input::placeholder,sh-form-field .input-wrap textarea::placeholder,sh-form-field .input-wrap input::placeholder{color:var(--base-6)}sh-form-field-popover .input-wrap textarea:focus,sh-form-field-popover .input-wrap input:focus,sh-form-field .input-wrap textarea:focus,sh-form-field .input-wrap input:focus{outline:none}sh-form-field-popover .input-wrap textarea[type=number],sh-form-field-popover .input-wrap input[type=number],sh-form-field .input-wrap textarea[type=number],sh-form-field .input-wrap input[type=number]{appearance:textfield;text-align:right}sh-form-field-popover .input-wrap textarea[type=number]::-webkit-outer-spin-button,sh-form-field-popover .input-wrap textarea[type=number]::-webkit-inner-spin-button,sh-form-field-popover .input-wrap input[type=number]::-webkit-outer-spin-button,sh-form-field-popover .input-wrap input[type=number]::-webkit-inner-spin-button,sh-form-field .input-wrap textarea[type=number]::-webkit-outer-spin-button,sh-form-field .input-wrap textarea[type=number]::-webkit-inner-spin-button,sh-form-field .input-wrap input[type=number]::-webkit-outer-spin-button,sh-form-field .input-wrap input[type=number]::-webkit-inner-spin-button{display:none}sh-form-field-popover .input-wrap textarea[type=number]:has(+.suffix:not(:empty)),sh-form-field-popover .input-wrap input[type=number]:has(+.suffix:not(:empty)),sh-form-field .input-wrap textarea[type=number]:has(+.suffix:not(:empty)),sh-form-field .input-wrap input[type=number]:has(+.suffix:not(:empty)){margin-right:0}sh-form-field-popover .input-wrap textarea[type=time],sh-form-field-popover .input-wrap input[type=time],sh-form-field .input-wrap textarea[type=time],sh-form-field .input-wrap input[type=time]{appearance:textfield;text-align:center;line-height:1rem}sh-form-field-popover .input-wrap textarea[type=time]::-webkit-calendar-picker-indicator,sh-form-field-popover .input-wrap input[type=time]::-webkit-calendar-picker-indicator,sh-form-field .input-wrap textarea[type=time]::-webkit-calendar-picker-indicator,sh-form-field .input-wrap input[type=time]::-webkit-calendar-picker-indicator{appearance:none;display:none}sh-form-field-popover .helpers,sh-form-field .helpers{height:1.25rem;display:flex;align-items:center;gap:.25rem;padding-top:.25rem;width:100%}sh-form-field-popover .helpers [hint],sh-form-field .helpers [hint]{color:var(--base-9)}sh-form-field-popover .helpers [hint][suffix],sh-form-field .helpers [hint][suffix]{text-align:right;width:100%}sh-form-field-popover .helpers:has(.error-wrap:not(:empty)) .hint,sh-form-field .helpers:has(.error-wrap:not(:empty)) .hint{display:none}sh-form-field-popover:has(.error-wrap:empty+.hint:empty) .helpers,sh-form-field:has(.error-wrap:empty+.hint:empty) .helpers{height:0;padding-top:0}sh-form-field-popover:has(input.ng-touched.ng-invalid) .helpers .hint,sh-form-field:has(input.ng-touched.ng-invalid) .helpers .hint{opacity:0;visibility:hidden}sh-form-field-popover .error-wrap,sh-form-field .error-wrap{color:var(--error-8);opacity:1;transition:opacity 125ms linear;position:absolute;bottom:0;left:0;right:0;width:100%}sh-form-field-popover .hint,sh-form-field .hint{display:flex;align-items:center;justify-content:space-between;width:100%;color:var(--base-8);opacity:1;transition:visibility 125ms linear,opacity 125ms linear;visibility:visible}sh-form-field-popover .hint:empty,sh-form-field .hint:empty{opacity:0}sh-form-field-popover.error,sh-form-field.error{--ff-ic: var(--error-8)}sh-form-field-popover.warning,sh-form-field.warning{--ff-ic: var(--warn-8)}sh-form-field-popover.success,sh-form-field.success{--ff-ic: var(--success-8)}sh-form-field-popover.horizontal,sh-form-field.horizontal{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:0 1rem}sh-form-field-popover.horizontal label,sh-form-field.horizontal label{padding-bottom:0;margin-bottom:0;grid-column:1}sh-form-field-popover.horizontal .input-wrap,sh-form-field.horizontal .input-wrap{grid-column:2}sh-form-field-popover.horizontal .helpers,sh-form-field.horizontal .helpers{grid-column:2}
4
+ `],encapsulation:2});}}return s})(),Ae=(()=>{class s{constructor(){this.#e=T(Jr),this.isOpen=m1(false),this.closed=h1(),this.color=g1(null),this.variant=g1(null),this.size=g1(null),this.readonly=g1(false),this.hostClasses=ce$1("formField",{color:this.color,variant:this.variant,size:this.size,readonly:this.readonly});}#e;onClick(i){i.target.closest(".input-wrap")&&(this.#e.nativeElement.querySelector("input")&&this.#e.nativeElement.querySelector("input").focus(),this.#e.nativeElement.querySelector("textarea")&&this.#e.nativeElement.querySelector("textarea").focus());}close(){this.closed.emit();}ngOnInit(){let i=typeof CSS<"u"&&CSS.supports("field-sizing","content"),e=this.#e.nativeElement.querySelector("textarea");if(!i&&e!==null){let d=function(){o.style.height="auto",o.style.height=o.scrollHeight+"px";},p=function(){setTimeout(d,0);};let o=this.#e.nativeElement.querySelector("textarea");o&&(o.addEventListener("change",d),o.addEventListener("cut",p),o.addEventListener("paste",p),o.addEventListener("drop",p),o.addEventListener("keydown",p),o.focus(),o.select(),d());}}static{this.\u0275fac=function(e){return new(e||s)};}static{this.\u0275cmp=dw({type:s,selectors:[["sh-form-field-popover"]],hostVars:2,hostBindings:function(e,r){e&1&&Fg("click",function(o){return r.onClick(o)}),e&2&&bC(r.hostClasses());},inputs:{isOpen:[1,"isOpen"],color:[1,"color"],variant:[1,"variant"],size:[1,"size"],readonly:[1,"readonly"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:ve,decls:18,vars:6,consts:[[3,"isOpenChange","closed","isOpen","asSheetOnMobile","options"],["trigger","",1,"input-wrap"],[1,"prefix"],[1,"prefix-space"],[1,"suffix-space"],[1,"helpers"],[1,"error-wrap"],[1,"hint"]],template:function(e,r){e&1&&(oC(ce),iC(0),Qi(1,"sh-popover",0),sm("isOpenChange",function(o){return HC(r.isOpen,o)||(r.isOpen=o),o}),Fg("closed",function(){return r.close()}),Qi(2,"div",1)(3,"div",2),iC(4,1),iC(5,2),Hl(),mg(6,"div",3),iC(7,3),iC(8,4),iC(9,5),mg(10,"div",4),iC(11,6),Hl(),iC(12,7),Hl(),Qi(13,"div",5)(14,"div",6),iC(15,8),Hl(),Qi(16,"div",7),iC(17,9),Hl()()),e&2&&(DE(),im("isOpen",r.isOpen),gg("asSheetOnMobile",true)("options",QC(5,ge)),DE(),Qg("is-open",r.isOpen()));},dependencies:[oe],styles:[be],encapsulation:2});}}return s})();export{Ae as A,Fe as F,oe as o};
@@ -0,0 +1,2 @@
1
+ import {D}from'./chunk-BAZ5npJw.js';import {d}from'./chunk-DQW8lSiz.js';import {T,ae as Jr,bB as yD,bu as N,b as g1,N as Nt$1,ac as h1,af as m1,b8 as ce,c6 as I1,B as y1,b$ as oe$1,U as Ue,G as Ga,c as me,d as dw,L as oC,Q as Qi,Y as iC,H as Hl,o as oT,D as DE,i as iT,F as Fg,c8 as LI,aC as hg,h as bC,ag as zg,I as Qg,$ as $g,K as lC,c7 as Bg,bZ as ei,f as N$1,a1 as cT,ap as sT,a2 as lT,j as mg,bE as Te,b5 as mw,c9 as FI,q as PC,z as gg,aa as Gl,ak as cm,n as nC,al as BC,ao as $C,b_ as Ig,aF as YC,E as nm}from'./main-PXGZLKMN.js';var Ht=["theadLocal"],Rt=["tbodyLocal"],Lt=[[["","actionbar","",3,"align-right",""]],[["","actionbar","","align-right",""]],[["sh-table-content"]],[["th"]],[["","thead",""]],"*",[["","table-no-rows",""]]],Bt=["[actionbar]:not([align-right])","[actionbar][align-right]","sh-table-content","th","[thead]","*","[table-no-rows]"];function Ft(n,c){n&1&&mg(0,"sh-progress-bar",4);}function It(n,c){n&1&&(Qi(0,"thead",6,0),iC(2,3),iC(3,4),Hl(),Qi(4,"tbody",6,1),iC(6,5),Hl());}function Wt(n,c){n&1&&(Qi(0,"div",5),iC(1,6),Hl());}var $t=["thead"],qt=["tbody"],Ot=(n,c)=>({$implicit:n,column:c}),Nt=(n,c)=>c.id;function Xt(n,c){n&1&&(Qi(0,"sh-icon"),PC(1,"caret-up"),Hl());}function Yt(n,c){n&1&&(Qi(0,"sh-icon"),PC(1,"caret-down"),Hl());}function Pt(n,c){n&1&&(Qi(0,"sh-icon"),PC(1,"arrows-down-up"),Hl());}function Vt(n,c){if(n&1&&oT(0,Xt,2,0,"sh-icon")(1,Yt,2,0,"sh-icon")(2,Pt,2,0,"sh-icon"),n&2){let t=nC().$implicit,e=nC();iT(e.sortByColumn()===t.id?0:e.sortByColumn()==="-"+t.id?1:2);}}function jt(n,c){if(n&1&&(Qi(0,"th",5),PC(1),oT(2,Vt,3,1),Hl()),n&2){let t=c.$implicit;Qg("sticky",t.sticky==="start")("sticky-end",t.sticky==="end"),gg("id",t.id)("shSort",t.sortable?t.id:void 0)("resizable",!!t.resizable)("minWidth",t.minWidth??50)("maxWidth",t.maxWidth??null),hg("aria-label",t.header)("size",t.size||null),DE(),Gl(" ",t.header," "),DE(),iT(t.sortable?2:-1);}}function Kt(n,c){if(n&1&&Ig(0,8),n&2){let t=nC().$implicit,e=nC().$implicit;gg("ngTemplateOutlet",t.cellTemplate)("ngTemplateOutletContext",YC(2,Ot,e,t));}}function Qt(n,c){if(n&1&&PC(0),n&2){let t=nC().$implicit,e=nC().$implicit;Gl(" ",t.cell(e)," ");}}function Ut(n,c){if(n&1&&PC(0),n&2){let t=nC().$implicit,e=nC().$implicit,i=nC();Gl(" ",t.format(i.getValue(e,t),e)," ");}}function Gt(n,c){if(n&1&&PC(0),n&2){let t=nC(2).$implicit,e=nC().$implicit,i=nC();Gl(" ",i.formatDate(i.getValue(e,t))," ");}}function Zt(n,c){n&1&&(Qi(0,"sh-icon",9),PC(1,"check"),Hl());}function Jt(n,c){n&1&&(Qi(0,"sh-icon",10),PC(1,"x"),Hl());}function te(n,c){if(n&1&&oT(0,Zt,2,0,"sh-icon",9)(1,Jt,2,0,"sh-icon",10),n&2){let t=nC(2).$implicit,e=nC().$implicit,i=nC();iT(i.getValue(e,t)?0:1);}}function ee(n,c){if(n&1&&(Qi(0,"sh-chip"),PC(1),Hl()),n&2){let t=nC(2).$implicit,e=nC().$implicit,i=nC();DE(),nm(i.getValue(e,t));}}function ie(n,c){if(n&1&&PC(0),n&2){let t=nC(2).$implicit,e=nC().$implicit,i=nC();Gl(" ",i.getValue(e,t)," ");}}function ne(n,c){if(n&1&&oT(0,Gt,1,1)(1,te,2,1)(2,ee,2,1,"sh-chip")(3,ie,1,1),n&2){let t,e=nC().$implicit;iT((t=e.type)==="date"?0:t==="boolean"?1:t==="badge"?2:3);}}function se(n,c){if(n&1&&(Qi(0,"td",7),oT(1,Kt,1,5,"ng-container",8)(2,Qt,1,1)(3,Ut,1,1)(4,ne,4,1),Hl()),n&2){let t=c.$implicit;nC();let e=$C(0),i=nC();Qg("sticky",t.sticky==="start")("sticky-end",t.sticky==="end"),gg("id",t.id+"-"+e),hg("aria-labelledby",t.id+" "+t.id+"-"+e)("role",t.rowHeader?"rowheader":i.grid()?"gridcell":"cell"),DE(),iT(t.cellTemplate?1:t.cell?2:t.format?3:4);}}function oe(n,c){if(n&1&&(cm(0),Qi(1,"tr",3),cT(2,se,5,8,"td",6,Nt),Hl()),n&2){let t=c.$index,e=nC();BC(t),DE(2),lT(e.columns());}}var Et=(()=>{class n{#e;#t;#i;#n;#o;#s;#a;#c;#l;#r;constructor(){this.#e=T(Jr),this.#t=T(yD),this.#i=T(ot),this.#n=T(N),this.#o=T(Te),this.#s=Ue(null),this.resizable=g1(true),this.minWidth=g1(50),this.maxWidth=g1(null),this.resizingClass=Ue(false),this.#l=false,this.#r=null,Ga(()=>{if(this.#s())return;let t=this.#e.nativeElement;if(this.resizable()){let e=[],i="table.column-resize-decrease",o=this.#n.getShortcut(i);o&&e.push(this.#n.getDisplayShortcut(i)||o);let s="table.column-resize-increase",r=this.#n.getShortcut(s);r&&e.push(this.#n.getDisplayShortcut(s)||r),e.length>0?this.#t.setAttribute(t,"aria-keyshortcuts",e.join(", ")):this.#t.removeAttribute(t,"aria-keyshortcuts");}else this.#t.removeAttribute(t,"aria-keyshortcuts");});}ngOnInit(){if(!this.#i){console.error("shTableResize directive must be used within a sh-table component.");return}let t=this.#e.nativeElement;if(this.#s.set(this.#o.get(Mt,null,{optional:true,self:true})),this.resizable()){let e=this.#t.createElement("div");this.#t.addClass(e,"sh-resizer"),this.#t.appendChild(t,e),this.#t.listen(e,"mousedown",this.#h.bind(this)),t.hasAttribute("role")||this.#t.setAttribute(t,"role","columnheader"),!this.#s()&&!t.hasAttribute("tabindex")&&this.#t.setAttribute(t,"tabindex","0");}}onKeyDown(t){if(!this.resizable())return;let e=t.target,i=this.#e.nativeElement;if(e!==i&&(e.tagName==="BUTTON"||e.tagName==="INPUT"||e.tagName==="SELECT"||e.tagName==="TEXTAREA"||e.closest("button, input, select, textarea, a")!==null||e.closest('[role="button"], [role="checkbox"], [role="menuitem"]')!==null))return;if((t.key==="ArrowLeft"||t.key==="ArrowRight")&&!t.shiftKey&&!this.#s()){let r=i.parentElement;if(r){let a=Array.from(r.querySelectorAll("th")).filter(h=>h.getAttribute("tabindex")==="0"||h.hasAttribute("shSort")||h.hasAttribute("shResize")),l=a.indexOf(i);if(l!==-1){let h=t.key==="ArrowRight"?l+1:l-1;if(h>=0&&h<a.length){t.preventDefault(),a[h].focus();return}}}}let o=this.#n.matches(t,"table.column-resize-decrease"),s=this.#n.matches(t,"table.column-resize-increase");if(o||s){t.preventDefault(),t.stopPropagation();let r=this.#e.nativeElement.offsetWidth,a=10,l=o?r-a:r+a,h=Math.max(this.minWidth(),this.maxWidth()?Math.min(l,this.maxWidth()??l):l);this.#t.setAttribute(this.#e.nativeElement,"size",`${h}px`),this.#i.updateColumnSizes();}}onMouseMove(t){this.#l&&this.#d(t);}onMouseUp(t){this.#l&&(this.#l=false,this.resizingClass.set(false),this.#r!==null&&(cancelAnimationFrame(this.#r),this.#r=null),setTimeout(()=>{this.#i.resizing.set(false);},50));}onClick(t){this.#l&&t.stopPropagation();}#h(t){t.stopPropagation(),this.resizable()&&(this.#i.resizing.set(true),this.#l=true,this.resizingClass.set(true),this.#a=t.pageX,this.#c=this.#e.nativeElement.offsetWidth);}#d(t){this.#r!==null&&cancelAnimationFrame(this.#r),this.#r=requestAnimationFrame(()=>{this.#b(t),this.#r=null;});}#b(t){let e=this.#c+(t.pageX-this.#a),i=Math.max(this.minWidth(),this.maxWidth()?Math.min(e,this.maxWidth()??e):e);this.#t.setAttribute(this.#e.nativeElement,"size",`${i}px`),this.#i.updateColumnSizes();}ngOnDestroy(){this.#r!==null&&cancelAnimationFrame(this.#r);}static{this.\u0275fac=function(e){return new(e||n)};}static{this.\u0275dir=mw({type:n,selectors:[["","shResize",""]],hostVars:2,hostBindings:function(e,i){e&1&&Fg("keydown",function(s){return i.onKeyDown(s)})("mousemove",function(s){return i.onMouseMove(s)},FI)("mouseup",function(s){return i.onMouseUp(s)},FI)("click",function(s){return i.onClick(s)},FI),e&2&&Qg("resizing",i.resizingClass());},inputs:{resizable:[1,"resizable"],minWidth:[1,"minWidth"],maxWidth:[1,"maxWidth"]}});}}return n})(),Mt=(()=>{class n{constructor(){this.#e=T(ot),this.#t=T(N),this.#i=T(Te),this.#n=T(Jr),this.#o=Ue(null),this.shSort=g1(),this.tabIndex=Nt$1(()=>{let t=this.#o();return this.shSort()||t&&t.resizable()?"0":null}),this.ariaKeyshortcuts=Nt$1(()=>{let t=[],e=this.#o();if(this.shSort()){let i="table.sort",o=this.#t.getShortcut(i);o&&t.push(this.#t.getDisplayShortcut(i)||o);}if(e&&e.resizable()){let i="table.column-resize-decrease",o=this.#t.getShortcut(i);o&&t.push(this.#t.getDisplayShortcut(i)||o);let s="table.column-resize-increase",r=this.#t.getShortcut(s);r&&t.push(this.#t.getDisplayShortcut(s)||r);}return t.length>0?t.join(", "):null}),this.sortAsc=Nt$1(()=>{let t=this.#e.sortByColumn(),e=this.shSort();return !t||!e?false:t===e}),this.sortDesc=Nt$1(()=>{let t=this.#e.sortByColumn(),e=this.shSort();return !t||!e?false:t===`-${e}`}),this.ariaSort=Nt$1(()=>this.sortAsc()?"ascending":this.sortDesc()?"descending":"none");}#e;#t;#i;#n;#o;ngOnInit(){this.#o.set(this.#i.get(Et,null,{optional:true,self:true}));}onKeyDown(t){if(!this.shSort())return;let e=t.target,i=this.#n.nativeElement;if(!(e!==i&&(e.tagName==="BUTTON"||e.tagName==="INPUT"||e.tagName==="SELECT"||e.tagName==="TEXTAREA"||e.closest("button, input, select, textarea, a")!==null||e.closest('[role="button"], [role="checkbox"], [role="menuitem"]')!==null))){if((t.key==="ArrowLeft"||t.key==="ArrowRight")&&!t.shiftKey){let o=i.parentElement;if(o){let s=Array.from(o.querySelectorAll("th")).filter(a=>a.getAttribute("tabindex")==="0"||a.hasAttribute("shSort")||a.hasAttribute("shResize")),r=s.indexOf(i);if(r!==-1){let a=t.key==="ArrowRight"?r+1:r-1;if(a>=0&&a<s.length){t.preventDefault(),s[a].focus();return}}}}this.#t.matches(t,"table.sort")&&this.toggleSort(t);}}toggleSort(t){if(t){let i=t.target,o=this.#n.nativeElement;if(i!==o&&(i.tagName==="BUTTON"||i.tagName==="INPUT"||i.tagName==="SELECT"||i.tagName==="TEXTAREA"||i.closest("button, input, select, textarea, a")!==null||i.closest('[role="button"], [role="checkbox"], [role="menuitem"]')!==null))return;t.preventDefault();}if(this.#e.resizing())return;let e=this.shSort();e&&this.#e.toggleSort(e);}static{this.\u0275fac=function(e){return new(e||n)};}static{this.\u0275dir=mw({type:n,selectors:[["","shSort",""]],hostAttrs:["role","columnheader"],hostVars:9,hostBindings:function(e,i){e&1&&Fg("click",function(s){return i.shSort()?i.toggleSort(s):null})("keydown",function(s){return i.onKeyDown(s)}),e&2&&(hg("tabindex",i.tabIndex())("aria-sort",i.shSort()?i.ariaSort():null)("aria-keyshortcuts",i.ariaKeyshortcuts()),Qg("sortable",!!i.shSort())("sort-asc",i.sortAsc())("sort-desc",i.sortDesc()));},inputs:{shSort:[1,"shSort"]}});}}return n})();(()=>{class n{constructor(){this.#e=T(Jr),this.#t=T(yD),this.shStickyColumns=g1("start");}#e;#t;ngAfterContentInit(){this.#i();}#i(){let t=this.#e.nativeElement,i=t.querySelectorAll(":scope > th, :scope > td").length;if(i>0){let o=this.shStickyColumns();this.#t.setStyle(t,"grid-column",o==="end"?`-${i+1} / -1`:`1 / ${i+1}`);}}static{this.\u0275fac=function(e){return new(e||n)};}static{this.\u0275dir=mw({type:n,selectors:[["","shStickyColumns",""]],hostVars:4,hostBindings:function(e,i){e&2&&Qg("sticky",i.shStickyColumns()==="start"||i.shStickyColumns()==="")("sticky-end",i.shStickyColumns()==="end");},inputs:{shStickyColumns:[1,"shStickyColumns"]}});}}return n})();var F=1.5,ot=(()=>{class n{constructor(){this.#e=T(Jr),this.#t=T(yD),this.#i=T(N),this.grid=g1(false),this.role=Nt$1(()=>this.grid()?"grid":"table"),this.loading=g1(false),this.data=g1([]),this.dataChange=h1(),this.sortByColumn=m1(null),this.color=g1(null),this.variant=g1(null),this.ariaLabel=g1(null,{alias:"aria-label"}),this.ariaLabelledby=g1(null,{alias:"aria-labelledby"}),this.hostClasses=ce("table",{color:this.color,variant:this.variant}),this.content=I1(At),this.theadLocal=y1("theadLocal"),this.tbodyLocal=y1("tbodyLocal"),this.thead=Nt$1(()=>this.content()?.thead()||this.theadLocal()),this.tbody=Nt$1(()=>this.content()?.tbody()||this.tbodyLocal()),this.columns=oe$1(this.thead,["tr:first-child th"]),this.stickyHeaderHeight=Ue(0),this.theadEffect=Ga(t=>{let e=this.thead()?.nativeElement;if(e&&typeof ResizeObserver<"u"){let i=new ResizeObserver(o=>{let s=e.clientHeight;this.stickyHeaderHeight.set(s);});i.observe(e),t(()=>i.disconnect());}}),this.bodyEffect=Ga(()=>{let t=this.tbody()?.nativeElement,e=this.thead()?.nativeElement;if(!t||!e)return;let i=this.stickyHeaderHeight();queueMicrotask(()=>{let o=e.querySelectorAll("tr.sticky").length>0,s=t.querySelectorAll("tr.sticky");if(s.length>0&&o)for(let a=0;a<s.length;a++)s[a].style.top=`${i}px`;});}),this.gridSetupEffect=Ga(()=>{let t=this.grid();this.data();this.columns.signal();me(()=>{let o=this.#e.nativeElement,s=o.querySelectorAll("th, td");if(t){if(s.length===0)return;let r=false;s.forEach(l=>{l.getAttribute("tabindex")==="0"&&(r=true);}),r||this.#t.setAttribute(s[0],"tabindex","0"),s.forEach(l=>{l.getAttribute("tabindex")!=="0"&&this.#t.setAttribute(l,"tabindex","-1"),l.hasAttribute("role")||this.#t.setAttribute(l,"role",l.tagName==="TD"?"gridcell":"columnheader");}),o.querySelectorAll("tr").forEach(l=>{l.hasAttribute("role")||this.#t.setAttribute(l,"role","row");});}else s.forEach(r=>{r.tagName==="TH"?r.classList.contains("sortable")||r.querySelector(".sh-resizer")!==null||r.hasAttribute("aria-keyshortcuts")?this.#t.setAttribute(r,"tabindex","0"):this.#t.removeAttribute(r,"tabindex"):this.#t.removeAttribute(r,"tabindex");});});}),this.resizing=Ue(false),this.sizeTrigger=Ue(true),this.#n=null,this.#o=Ue(false),this.scrollXState=Ue(-1),this.scrollYState=Ue(-1),this.canScrollX=Ue(false),this.canScrollY=Ue(false),this.columnSizes=Nt$1(()=>{this.sizeTrigger();let t=this.columns.signal();return t.reduce((e,i,o)=>{let s=i,r=s.getAttribute("size"),a=o===t.length-1;return r?`${e} ${r}`:s.classList.contains("sticky")||s.classList.contains("sticky-end")?`${e} min-content`:a?`${e} 1fr`:`${e} 1fr`},"")}),this.e=Ga(()=>{let t=this.sortByColumn();if(t===null)return this.#o()||(this.#n=this.data(),this.#o.set(true)),this.dataChange.emit(structuredClone(this.#n));let e=t.startsWith("-")?t.slice(1):t,i=t.startsWith("-"),o=this.data(),s=[...o].sort((a,l)=>{let h=this.content()?.columns()?.find(y=>y.id===e);if(h?.sortPredicate){let y=h.sortPredicate(a,l);return i?-y:y}let f=h?this.content()?.getValue(a,h):a[e],b=h?this.content()?.getValue(l,h):l[e],M=f==null,D=b==null;if(M&&D)return 0;if(M)return 1;if(D)return -1;let _=0;if(h?.type==="date"){let y=new Date(f).getTime(),u=new Date(b).getTime();_=isNaN(y)||isNaN(u)?0:y-u;}else h?.type==="number"?_=Number(f)-Number(b):h?.type==="boolean"?_=(f?1:0)-(b?1:0):h?.type==="string"||h?.type==="badge"?_=f.toString().localeCompare(b.toString(),void 0,{sensitivity:"base"}):typeof f=="number"&&typeof b=="number"?_=f-b:f instanceof Date&&b instanceof Date?_=f.getTime()-b.getTime():typeof f=="string"&&typeof b=="string"&&(_=f.localeCompare(b,void 0,{sensitivity:"base"}));return i?-_:_}),r=s.length!==o.length;if(!r){for(let a=0;a<s.length;a++)if(s[a]!==o[a]){r=true;break}}r&&this.dataChange.emit(s);});}#e;#t;#i;#n;#o;updateColumnSizes(){this.sizeTrigger.set(!this.sizeTrigger());}onScroll(){this.#a();}onResize(t){this.#a();}ngAfterViewInit(){queueMicrotask(()=>this.#a());}onFocusIn(t){if(!this.grid())return;let e=t.target;if(!e)return;let i=e.tagName==="TH"||e.tagName==="TD"?e:e.closest("th, td");if(i){i.hasAttribute("role")||this.#t.setAttribute(i,"role",i.tagName==="TD"?"gridcell":"columnheader");let o=i.parentElement;o&&!o.hasAttribute("role")&&this.#t.setAttribute(o,"role","row"),this.#t.setAttribute(i,"tabindex","0"),this.#e.nativeElement.querySelectorAll("th, td").forEach(r=>{r!==i&&this.#t.setAttribute(r,"tabindex","-1");});}}onGridKeyDown(t){if(!this.grid())return;if(t.key==="Tab"){let u=t.target,k=u.tagName==="TH"||u.tagName==="TD"?u:u.closest("th, td");if(!k)return;let I='button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])',H=Array.from(k.querySelectorAll(I)),Z=k.parentElement;if(!Z||Z.tagName!=="TR")return;let R=Array.from(Z.querySelectorAll("th, td")),N=R.indexOf(k);if(N===-1)return;if(t.shiftKey){let J=H.length>0&&u===H[0],O=u===k;if(J)t.preventDefault(),this.#s(k);else if(O&&N>0){t.preventDefault();let tt=R[N-1],et=Array.from(tt.querySelectorAll(I));et.length>0?(this.#s(tt),et[et.length-1].focus()):this.#s(tt);}}else {let J=H.length===0||u===H[H.length-1],O=u===k;J&&!O?N<R.length-1&&(t.preventDefault(),this.#s(R[N+1])):O&&H.length===0&&N<R.length-1&&(t.preventDefault(),this.#s(R[N+1]));}return}let e=this.#i.matches(t,"grid.focus-up"),i=this.#i.matches(t,"grid.focus-down"),o=this.#i.matches(t,"grid.focus-left"),s=this.#i.matches(t,"grid.focus-right"),r=this.#i.matches(t,"grid.focus-first"),a=this.#i.matches(t,"grid.focus-last");if(!e&&!i&&!o&&!s&&!r&&!a)return;let l=t.target;if(l.tagName!=="TH"&&l.tagName!=="TD")return;let h=l.parentElement;if(!h||h.tagName!=="TR")return;let f=Array.from(this.#e.nativeElement.querySelectorAll("tr")),b=f.indexOf(h);if(b===-1)return;let M=Array.from(h.querySelectorAll("th, td")),D=M.indexOf(l);if(D===-1)return;let _=b,y=D;if(e?_=b-1:i?_=b+1:o?y=D-1:s?y=D+1:r?y=0:a&&(y=M.length-1),_!==b){let u=f[_];if(u){let k=Array.from(u.querySelectorAll("th, td")),I=k[Math.min(D,k.length-1)];I&&(t.preventDefault(),this.#s(I));}}else if(y!==D){let u=M[y];u&&(t.preventDefault(),this.#s(u));}}#s(t){this.#t.setAttribute(t,"tabindex","0"),t.focus(),this.#e.nativeElement.querySelectorAll("th, td").forEach(i=>{i!==t&&this.#t.setAttribute(i,"tabindex","-1");});}toggleSort(t){let e=this.sortByColumn(),i=e===t?`-${t}`:e===`-${t}`?null:t;this.sortByColumn.set(i);}#a(){let t=this.#e.nativeElement,e=-1,i=-1,o=t.scrollWidth>t.clientWidth+F;if(o){let r=t.scrollLeft<=F;t.scrollWidth-(t.scrollLeft+t.clientWidth)<F?e=1:r||(e=0);}this.scrollXState.set(e),this.canScrollX.set(o);let s=t.scrollHeight>t.clientHeight+F;if(s){let r=t.scrollTop<=F;t.scrollHeight-(t.scrollTop+t.clientHeight)<F?i=1:r||(i=0);}this.scrollYState.set(i),this.canScrollY.set(s);}static{this.\u0275fac=function(e){return new(e||n)};}static{this.\u0275cmp=dw({type:n,selectors:[["sh-table"]],contentQueries:function(e,i,o){e&1&&Bg(o,i.content,At,5),e&2&&lC();},viewQuery:function(e,i){e&1&&$g(i.theadLocal,Ht,5)(i.tbodyLocal,Rt,5),e&2&&lC(2);},hostVars:22,hostBindings:function(e,i){e&1&&Fg("scroll",function(){return i.onScroll()})("resize",function(s){return i.onResize(s)},LI)("focusin",function(s){return i.onFocusIn(s)})("keydown",function(s){return i.onGridKeyDown(s)}),e&2&&(hg("role",i.role())("aria-busy",i.loading())("aria-label",i.ariaLabel())("aria-labelledby",i.ariaLabelledby()),bC(i.hostClasses()),zg("grid-template-columns",i.columnSizes()),Qg("resizing",i.resizing())("can-scroll-x",i.canScrollX())("can-scroll-y",i.canScrollY())("scrolled-x",i.scrollXState()>=0)("scrolled-x-end",i.scrollXState()===1)("scrolled-y",i.scrollYState()>=0)("scrolled-y-end",i.scrollYState()===1));},inputs:{grid:[1,"grid"],loading:[1,"loading"],data:[1,"data"],sortByColumn:[1,"sortByColumn"],color:[1,"color"],variant:[1,"variant"],ariaLabel:[1,"aria-label","ariaLabel"],ariaLabelledby:[1,"aria-labelledby","ariaLabelledby"]},outputs:{dataChange:"dataChange",sortByColumn:"sortByColumnChange"},ngContentSelectors:Bt,decls:8,vars:3,consts:[["theadLocal",""],["tbodyLocal",""],[1,"actionbar"],[1,"actionbar-right"],[1,"indeterminate","primary"],[1,"no-rows"],["role","rowgroup"]],template:function(e,i){e&1&&(oC(Lt),Qi(0,"div",2),iC(1),Qi(2,"div",3),iC(3,1),Hl()(),oT(4,Ft,1,0,"sh-progress-bar",4),iC(5,2),oT(6,It,7,0),oT(7,Wt,2,0,"div",5)),e&2&&(DE(4),iT(i.loading()?4:-1),DE(2),iT(i.content()?-1:6),DE(),iT(i.loading()?-1:7));},dependencies:[d],styles:[`sh-table{--table-bc: var(--base-4);--table-th-bg: var(--base-2);--table-tr-bg: var(--base-1);--table-td-bg: var(--base-1);--table-th-c: var(--base-8);--table-th-f: var(--paragraph-30);--table-td-c: var(--base-8);--table-td-f: var(--paragraph-30);--table-th-p: 0 1.25rem;--table-td-p: 0 1.25rem;--table-th-mh: 3rem;--table-td-mh: 4.875rem;--table-th-g: .25rem;--table-td-g: .5rem;--table-ws: nowrap;--table-th-bw: 0;--table-td-bw: .0625rem 0 0;--table-columns: 1fr 1fr 1fr max-content;--table-sticky-bw: .0625rem}sh-table.type-a tbody>th,sh-table.type-a tbody>td,sh-table.type-a thead>th,sh-table.type-a thead>td{padding-right:0}sh-table.type-a tbody>th:first-child,sh-table.type-a tbody>td:first-child,sh-table.type-a thead>th:first-child,sh-table.type-a thead>td:first-child{padding:0}sh-table.type-b{--table-th-p: 0 .75rem;--table-td-p: 0 .75rem;--table-th-mh: 2.25rem;--table-td-mh: 3.5rem;--table-th-bw: .0625rem 0 .0625rem .0625rem;--table-td-bw: 0 0 .0625rem .0625rem;--table-sticky-bw: .0625rem}sh-table.type-b th:first-child{border-left-width:0;padding:var(--table-th-p)}sh-table.type-b td:first-child{border-left-width:0;padding:var(--table-td-p)}sh-table.type-b td.sticky,sh-table.type-b th.sticky{border-left-width:0;border-right:var(--table-sticky-bw) solid var(--table-bc)}sh-table.type-b [shStickyColumns] th,sh-table.type-b [shStickyColumns] td{border-right:var(--table-sticky-bw) solid var(--table-bc)}sh-table.type-b th.sticky-end,sh-table.type-b td.sticky-end,sh-table.type-b [shStickyColumns=end] th,sh-table.type-b [shStickyColumns=end] td{border-left:var(--table-sticky-bw) solid var(--table-bc);border-right:0}sh-table.type-b .sticky+th,sh-table.type-b .sticky+td,sh-table.type-b [shStickyColumns]+th,sh-table.type-b [shStickyColumns]+td{border-left-width:0}sh-table.type-b tr:hover td{background-color:var(--base-2)}sh-table.type-b div[table-header] tr:first-child th{border-bottom:0}sh-table.type-b tbody tr:last-child td{border-bottom-width:0}sh-table.type-b .actionbar{background-color:var(--base-2);border-width:.0625rem 0 0}sh-table{width:100%;display:grid;overflow:auto;overscroll-behavior-x:none;grid-template-columns:var(--table-columns);position:relative;container-type:inline-size}sh-table.resizing{-webkit-user-select:none;user-select:none}sh-table:has([shTableResize]) td{overflow:auto}sh-table.no-resize .sh-resizer{display:none}sh-table.no-resize td{overflow:initial}sh-table .actionbar{display:flex;align-items:center;gap:.5rem;grid-column:1/-1;position:sticky;left:0;z-index:10;background-color:var(--base-1);width:100cqw;box-sizing:border-box;padding:.5rem;border:var(--border-10);border-width:.0625rem 0;opacity:1;transition:padding .3s ease-out,border-width .3s ease-out,opacity .3s ease-out;overflow:hidden}sh-table .actionbar:empty,sh-table .actionbar:not(:has(>:not(.actionbar-right))):has(>.actionbar-right:empty){display:none}sh-table .actionbar>*{min-height:0}sh-table .actionbar .actionbar-right{display:flex;align-items:center;gap:.5rem;margin-left:auto;flex-shrink:0}sh-table .actionbar .actionbar-right:empty{display:none}sh-table tbody{position:relative}sh-table tbody:has(tr.sticky){position:sticky;top:0;z-index:1}sh-table thead{position:relative}sh-table thead:has(tr.sticky){position:sticky;top:0;z-index:2}sh-table sh-progress-bar{grid-column:1/-1;position:absolute;top:100%;transform:translateY(-50%);z-index:200}sh-table tbody,sh-table thead,sh-table tr{display:grid;grid-column:1/-1;grid-template-columns:subgrid}sh-table tr{background:var(--table-tr-bg);position:relative;z-index:0}sh-table tr.sticky{position:sticky;top:0;z-index:1}sh-table tr.sticky-end{position:sticky;bottom:0;z-index:3}sh-table tr:has(th.sticky-end) th:nth-last-child(2){padding:var(--table-th-p)}sh-table tr:has(td.sticky-end) td:nth-last-child(2){padding:var(--table-td-p)}sh-table th{display:flex;align-items:center;padding:var(--table-th-p);min-height:var(--table-th-mh);font:var(--table-th-f);line-height:1em;white-space:var(--table-ws);color:var(--table-th-c);border:0;border-color:var(--table-bc);border-style:solid;border-width:var(--table-th-bw);background:var(--table-th-bg);gap:var(--table-th-g);z-index:auto}sh-table th:focus-visible{outline:.125rem solid var(--primary-8);outline-offset:-.125rem}sh-table th:hover,sh-table th.resizing{z-index:10}sh-table th:has(.sh-resizer){position:relative;z-index:2}sh-table th.sortable{--caret-color: var(--base-10);--caret-size: .375rem;cursor:pointer;-webkit-user-select:none;user-select:none}sh-table th.sortable sh-icon{opacity:.35;transition:opacity 125ms ease-in-out}sh-table th.sortable:hover sh-icon{opacity:.7}sh-table th.sortable.sort-asc sh-icon,sh-table th.sortable.sort-desc sh-icon{opacity:1}sh-table th.sortable:not(:has(sh-icon)):after{content:"";border:var(--caret-size) solid transparent;width:0;height:0;opacity:0;transition:opacity 125ms ease-in-out}sh-table th.sortable:not(:has(sh-icon)).sort-desc:after{opacity:1;transform:translateY(-4px);border-bottom-color:var(--caret-color)}sh-table th.sortable:not(:has(sh-icon)).sort-asc:after{opacity:1;transform:translateY(4px);border-top-color:var(--caret-color)}sh-table th .sh-resizer{width:.75rem;height:100%;position:absolute;top:0;right:-.375rem;cursor:col-resize;z-index:5}sh-table th .sh-resizer:after{content:"";position:absolute;top:.3125rem;bottom:.3125rem;border-radius:.125rem;left:50%;transform:translate(-50%);width:.1875rem;background-color:var(--base-4);transition:width .15s ease,background-color .15s ease}sh-table th .sh-resizer:hover:after{width:.3125rem;background-color:var(--primary-8)}@media(pointer:coarse){sh-table th .sh-resizer{width:1.5rem;right:-.75rem}}sh-table th.resizing .sh-resizer:after{width:.3125rem;background-color:var(--primary-8)}sh-table td{display:flex;align-items:center;padding:var(--table-td-p);min-height:var(--table-td-mh);gap:var(--table-td-g);color:var(--table-td-c);font:var(--table-td-f);white-space:var(--table-ws);border-color:var(--table-bc);border-style:solid;border-width:var(--table-td-bw);background:var(--table-td-bg)}sh-table td+td.sticky-end:last-child{padding:var(--table-td-p)}sh-table th.sticky,sh-table th.sticky-end,sh-table td.sticky,sh-table td.sticky-end{position:sticky;overflow:hidden;right:auto;left:0;z-index:1;padding:var(--table-td-p)}sh-table th.sticky:first-child,sh-table th.sticky-end:first-child,sh-table td.sticky:first-child,sh-table td.sticky-end:first-child{padding:var(--table-th-p)}sh-table th.sticky-end,sh-table td.sticky-end{right:0;left:auto}sh-table th.sticky,sh-table th.sticky-end{background:var(--base-1);padding:var(--table-th-p);z-index:101}sh-table th.sticky:first-child,sh-table th.sticky-end:first-child{padding:var(--table-th-p)}sh-table [shStickyColumns]{display:grid;grid-template-columns:subgrid;position:sticky;left:0;z-index:1000;border:0;border-color:var(--table-bc);border-style:solid}sh-table [shStickyColumns] th{background-color:var(--base-1)}sh-table [shStickyColumns=end]{left:auto;right:0}sh-table .span-all{grid-column:1/-1;white-space:initial;align-items:flex-start;padding:0;border-left-width:0;position:sticky;left:0;width:100cqw;box-sizing:border-box}sh-table .no-rows{display:none;grid-column:1/-1}sh-table tbody:empty+.no-rows{display:block}
2
+ `],encapsulation:2});}}return n})(),At=(()=>{class n{constructor(){this.#e=T(ot),this.columns=g1([]),this.data=g1([]),this.sortByColumn=this.#e.sortByColumn,this.grid=this.#e.grid,this.thead=y1("thead"),this.tbody=y1("tbody");}#e;getValue(t,e){if(!t)return "";let i=e.accessorKey||e.id;return typeof i=="string"&&i.includes(".")?i.split(".").reduce((o,s)=>o?.[s],t):t[i]}formatDate(t){if(!t)return "";let e=new Date(t);return isNaN(e.getTime())?String(t):e.toLocaleDateString()}static{this.\u0275fac=function(e){return new(e||n)};}static{this.\u0275cmp=dw({type:n,selectors:[["sh-table-content"]],viewQuery:function(e,i){e&1&&$g(i.thead,$t,5)(i.tbody,qt,5),e&2&&lC(2);},hostAttrs:[2,"display","contents"],inputs:{columns:[1,"columns"],data:[1,"data"]},decls:9,vars:0,consts:[["thead",""],["tbody",""],["role","rowgroup"],["role","row"],["role","columnheader","shResize","",3,"id","shSort","resizable","minWidth","maxWidth","sticky","sticky-end"],["role","columnheader","shResize","",3,"id","shSort","resizable","minWidth","maxWidth"],[3,"sticky","sticky-end","id"],[3,"id"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"text-success"],[1,"text-muted"]],template:function(e,i){e&1&&(Qi(0,"thead",2,0)(2,"tr",3),cT(3,jt,3,13,"th",4,Nt),Hl()(),Qi(5,"tbody",2,1),cT(7,oe,4,1,"tr",3,sT),Hl()),e&2&&(DE(3),lT(i.columns()),DE(4),lT(i.data()));},dependencies:[ei,Mt,Et,N$1,D],encapsulation:2});}}return n})();export{Et as ShipResize,Mt as ShipSort,ot as ShipTable,At as ShipTableContent};
@@ -1,3 +1,3 @@
1
- import {c}from'./chunk-CMs999gl.js';import {b as g1,b7 as le,d as dw,h as bC,T,ae as Jr,bx as N,af as m1,ac as h1,N as Nt$1,U as Ue$1,c5 as I1,b$ as $r,B as y1,by as ae,c as me,G as Ga,bs as ei,f as N$1,k as gT,L as oC,ak as cm,Q as Qi,s as sm,S as Sd,l as HC,x as xd,F as Fg,Y as iC,o as oT,H as Hl,a1 as cT,al as BC,D as DE,w as im,z as gg,a3 as QC,I as Qg,i as iT,a2 as lT,$ as $g,K as lC,c6 as Bg,ap as sT,q as PC,n as nC,aa as Gl,ao as $C,j as mg,E as nm,aC as hg,bf as ig,a_ as ZC,bu as Ig,aF as YC}from'./main-TZVLLK67.js';import {D}from'./chunk-CdZVal1F.js';import {U}from'./chunk-CU-RYihf.js';import {o as oe,F as Fe$1}from'./chunk-Do6_xsGi.js';var m=(()=>{class n{constructor(){this.color=g1(null),this.hostClasses=le("spinner",{color:this.color});}static{this.\u0275fac=function(e){return new(e||n)};}static{this.\u0275cmp=dw({type:n,selectors:[["sh-spinner"]],hostAttrs:["role","status","aria-busy","true"],hostVars:2,hostBindings:function(e,s){e&2&&bC(s.hostClasses());},inputs:{color:[1,"color"]},decls:0,vars:0,template:function(e,s){},styles:[`sh-spinner{--spinner-c: var(--base-8);--spinner-size: 2.5rem;--spinner-thickness: .3125rem;width:var(--spinner-size);height:var(--spinner-size);display:grid;place-content:center;color:var(--spinner-c);position:relative}sh-spinner:before{content:"";width:var(--spinner-size);height:var(--spinner-size);border:var(--spinner-thickness) solid currentColor;border-bottom-color:transparent;border-radius:50%;display:flex;box-sizing:border-box;animation:rotation 1s linear infinite;margin:auto;inset:0;position:absolute}sh-spinner.primary{--spinner-c: var(--primary-8)}sh-spinner.accent{--spinner-c: var(--accent-8)}sh-spinner.warn{--spinner-c: var(--warn-8)}sh-spinner.error{--spinner-c: var(--error-8)}sh-spinner.success{--spinner-c: var(--success-8)}
2
- `],encapsulation:2});}}return n})();var Ve=["optionsWrap"],Ie=[[["label"]],[["","prefix",""]],[["","boxPrefix",""]],[["input"]],[["textarea"]]],we=["label","[prefix]","[boxPrefix]","input","textarea"],Me=["ngProjectAs","label",5,["label"]],Fe=["ngProjectAs","[prefix]",5,["","prefix",""]],Ee=["ngProjectAs","[boxPrefix]",5,["","boxPrefix",""]],Le=()=>({closeOnButton:false,closeOnEsc:false}),Te=(i,l)=>({$implicit:i,last:l}),ie=i=>({$implicit:i});function De(i,l){if(i&1&&PC(0),i&2){let e=nC();Gl(" ",e.spacedSelectedOptions()," ");}}function Ne(i,l){i&1&&Ig(0);}function Ae(i,l){if(i&1&&ig(0,Ne,1,0,"ng-container",13),i&2){let e=nC(3),t=e.$implicit,n=e.$index,o=e.$count;nC(2);let s=$C(3);gg("ngTemplateOutlet",s)("ngTemplateOutletContext",YC(2,Te,t,n===o-1));}}function ke(i,l){if(i&1&&PC(0),i&2){let e=nC(3).$implicit,t=nC(2);Gl(" ",t.getLabel(e)," ");}}function $e(i,l){if(i&1){let e=gT();Qi(0,"sh-chip",12),Fg("click",function(n){Sd(e);let o=nC(2).$index,s=nC(2);return xd(s.removeSelectedOptionByIndex(n,o))}),oT(1,Ae,1,5,"ng-container")(2,ke,1,1),Qi(3,"sh-icon"),PC(4,"x-bold"),Hl()();}if(i&2){let e=nC(4),t=$C(3);bC(e.selectClasses()),DE(),iT(t?1:2);}}function Re(i,l){i&1&&Ig(0);}function Pe(i,l){if(i&1&&ig(0,Re,1,0,"ng-container",13),i&2){let e=nC(4),t=e.$implicit,n=e.$index,o=e.$count;nC(2);let s=$C(3);gg("ngTemplateOutlet",s)("ngTemplateOutletContext",YC(2,Te,t,n===o-1));}}function je(i,l){if(i&1&&PC(0),i&2){let e=nC(4),t=e.$implicit,n=e.$index,o=e.$count,s=nC(2);Gl(" ",n===o-1?s.getLabel(t):s.getLabel(t)+","," ");}}function ze(i,l){if(i&1&&oT(0,Pe,1,5,"ng-container")(1,je,1,1),i&2){nC(5);let e=$C(3);iT(e?0:1);}}function Be(i,l){if(i&1&&oT(0,ze,2,1),i&2){nC(4);let e=$C(6);iT(e?-1:0);}}function Ke(i,l){if(i&1&&oT(0,$e,5,3,"sh-chip",11)(1,Be,1,1),i&2){nC(3);let e=$C(5);iT(e?0:1);}}function We(i,l){if(i&1&&oT(0,Ke,2,1),i&2){let e=l.$implicit;iT(e?0:-1);}}function qe(i,l){if(i&1&&cT(0,We,1,1,null,null,sT),i&2){nC();let e=$C(2);lT(e);}}function Qe(i,l){i&1&&Ig(0);}function Ue(i,l){if(i&1&&ig(0,Qe,1,0,"ng-container",14),i&2){nC(2);let e=$C(0);gg("ngTemplateOutlet",e);}}function He(i,l){if(i&1&&PC(0),i&2){let e=nC(2);Gl(" ",e.placeholderText()??""," ");}}function Xe(i,l){if(i&1&&oT(0,Ue,1,1,"ng-container")(1,He,1,1),i&2){nC();let e=$C(0);iT(e?0:1);}}function Ge(i,l){i&1&&(Qi(0,"sh-icon",6),PC(1,"caret-down"),Hl());}function Je(i,l){i&1&&mg(0,"sh-spinner",7);}function Ye(i,l){i&1&&(Qi(0,"sh-icon",6),PC(1,"list-magnifying-glass"),Hl());}function Ze(i,l){i&1&&(Qi(0,"sh-icon",6),PC(1,"magnifying-glass"),Hl());}function et(i,l){if(i&1){let e=gT();Qi(0,"sh-icon",15),Fg("click",function(n){Sd(e);let o=nC();return xd(o.clear(n))}),PC(1,"x-bold"),Hl();}}function tt(i,l){i&1&&(Qi(0,"sh-icon",6),PC(1,"caret-down"),Hl());}function it(i,l){i&1&&(Qi(0,"sh-icon",6),PC(1,"caret-up"),Hl());}function nt(i,l){if(i&1&&(Qi(0,"p",9),PC(1),Hl()),i&2){let e=nC(3);DE(),nm(e.freeTextTitle());}}function ot(i,l){i&1&&Ig(0);}function st(i,l){if(i&1&&ig(0,ot,1,0,"ng-container",13),i&2){nC(2);let e=$C(0);nC();let t=$C(1);gg("ngTemplateOutlet",t)("ngTemplateOutletContext",ZC(2,ie,e));}}function lt(i,l){i&1&&Ig(0);}function at(i,l){if(i&1&&ig(0,lt,1,0,"ng-container",13),i&2){nC(2);let e=$C(0);nC();let t=$C(4);gg("ngTemplateOutlet",t)("ngTemplateOutletContext",ZC(2,ie,e));}}function rt(i,l){if(i&1&&PC(0),i&2){nC(2);let e=$C(1);Gl(" ",e," ");}}function ct(i,l){i&1&&mg(0,"sh-divider");}function pt(i,l){if(i&1){let e=gT();oT(0,nt,2,1,"p",9),Qi(1,"li",16),Fg("click",function(){Sd(e);let n=nC(2);return xd(n.toggleOptionByIndex(-1))}),oT(2,st,1,4,"ng-container")(3,at,1,4,"ng-container")(4,rt,1,1),Hl(),oT(5,ct,1,0,"sh-divider");}if(i&2){let e=nC(2),t=$C(1),n=$C(4);iT(e.freeTextTitle()?0:-1),DE(),Qg("selected",e.isSelected(-1))("focused",e.focusedOptionIndex()===-1),gg("id",e.getOptionId(-1)),hg("aria-selected",e.isSelected(-1)),DE(),iT(t?2:n?3:4),DE(3),iT(e.freeTextTitle()&&e.filteredOptions().length>0?5:-1);}}function dt(i,l){if(i&1&&(cm(0)(1),oT(2,pt,6,9)),i&2){let e=nC(),t=BC(e.computedFreeTextOption());DE();let n=BC(e.getValue(t));DE(),iT(n.length>0?2:-1);}}function ut(i,l){if(i&1&&(Qi(0,"p",9),PC(1),Hl()),i&2){let e=nC();DE(),nm(e.optionTitle());}}function ht(i,l){if(i&1&&mg(0,"sh-checkbox",18),i&2){let e=nC().$index,t=nC();bC(t.selectClasses()),gg("checked",t.isSelected(e));}}function _t(i,l){i&1&&Ig(0);}function ft(i,l){if(i&1&&ig(0,_t,1,0,"ng-container",13),i&2){let e=nC().$implicit;nC();let t=$C(4);gg("ngTemplateOutlet",t)("ngTemplateOutletContext",ZC(2,ie,e));}}function mt(i,l){if(i&1&&PC(0),i&2){let e=nC().$implicit,t=nC();Gl(" ",t.getLabel(e)," ");}}function xt(i,l){if(i&1){let e=gT();Qi(0,"li",16),Fg("click",function(){let n=Sd(e).$index,o=nC();return xd(o.toggleOptionByIndex(n))}),oT(1,ht,1,3,"sh-checkbox",17),oT(2,ft,1,4,"ng-container")(3,mt,1,1),Hl();}if(i&2){let e=l.$index,t=nC(),n=$C(4);Qg("selected",t.isSelected(e))("focused",e===t.focusedOptionIndex()),gg("id",t.getOptionId(e)),hg("aria-selected",t.isSelected(e)),DE(),iT(t.selectMultiple()?1:-1),DE(),iT(n?2:3);}}var Nt=(()=>{class i{constructor(){this.#i=T(Jr),this.#n=T(N),this.value=g1(),this.label=g1(),this.asFreeText=g1(false),this.color=g1(null),this.variant=g1(null),this.size=g1(null),this.optionTitle=g1(null),this.freeTextTitle=g1(null),this.freeTextPlaceholder=g1("Type to create a new option"),this.validateFreeText=g1(),this.placeholder=g1(),this.readonly=m1(false),this.disabled=m1(false),this.hostClasses=le("select",{color:this.color,variant:this.variant,size:this.size,readonly:this.readonly}),this.lazySearch=g1(false),this.inlineSearch=g1(false),this.asText=g1(false),this.isClearable=g1(true),this.selectMultiple=g1(false),this.optionTemplate=g1(null),this.selectedOptionTemplate=g1(null),this.placeholderTemplate=g1(null),this.freeTextOptionTemplate=g1(null),this.isOpen=m1(false),this.isLoading=m1(false),this.options=m1([]),this.selectedOptions=m1([]),this.cleared=h1(),this.onAddNewFreeTextOption=h1(),this.spacedSelectedOptions=Nt$1(()=>{let e=this.selectedOptions(),t=this.value();return e.map(n=>t?this.#e(n,t):n).join(", ")}),this.computedFreeTextOption=Nt$1(()=>{let e=this.inputValue(),t=this.value(),n=t?{}:e;return t&&typeof n=="object"&&(n[t]=e),n}),this.#o=Ue$1(null),this.#t=false,this.inlineTemplate=I1($r),this.optionsWrapRef=y1.required("optionsWrap"),this.inputRefInput=Ue$1(null),this.#s=typeof MutationObserver<"u"?new MutationObserver(e=>{for(var t of e)t&&(t.target.nodeName==="INPUT"||t.target.nodeName==="TEXTAREA")&&(this.inputRefInput.set(new Jr(t.target)),this.#s.disconnect());}):void 0,this.inputValue=Ue$1(""),this.prevInputValue=Ue$1(null),this.focusedOptionIndex=Ue$1(-1),this._isClearable=Nt$1(()=>this.selectMultiple()||this.isClearable()),this.selectClasses=Nt$1(()=>this.#i.nativeElement.classList.toString()),this.stretch=Nt$1(()=>this.selectClasses().includes("stretch")),this.small=Nt$1(()=>this.selectClasses().includes("small")),this.placeholderText=Nt$1(()=>{let e=this.placeholder(),t=this.inputRefEl();return e||t?.placeholder||null}),this.selectedOptionValues=Nt$1(()=>{let e=this.selectedOptions(),t=this.value();return t?e.map(n=>this.#e(n,t)):e}),this.filteredOptions=Nt$1(()=>{let e=this.options()||[],t=this.label(),n=this.value(),o=this.inlineSearch(),s=this.inputValue().toLowerCase(),c=this.#d(s);if(e.length<=0)return [];if(!o||s==="")return e;let _=e.filter(p=>{let h=t?(this.#e(p,t)??"").toString().toLowerCase():(p??"").toString().toLowerCase(),b=((n?this.#e(p,n):p)??"").toString().toLowerCase(),y=c.test(h),j=c.test(b);return y||j}).map(p=>{let h=t?(this.#e(p,t)??"").toString().toLowerCase():(p??"").toString().toLowerCase(),b=((n?this.#e(p,n):p)??"").toString().toLowerCase(),y=this.#l(h,s),j=this.#l(b,s);return {item:p,score:Math.max(y,j)}});return _.sort((p,h)=>h.score-p.score),_.map(p=>p.item)}),this.componentId=ae(),this.inputRefEl=Nt$1(()=>{let e=this.inputRefInput();if(e===null)return;let t=e?e.nativeElement:null;return t?(t.autocomplete="off",t.setAttribute("role","combobox"),t.setAttribute("id",`combobox-${this.componentId}`),t.setAttribute("aria-haspopup","listbox"),t.setAttribute("aria-owns",`optionsWrapId-${this.componentId}`),t.setAttribute("aria-controls",`optionsWrapId-${this.componentId}`),this.#p(t),t.addEventListener("focus",()=>{this.readonly()||this.open();}),t.addEventListener("input",n=>{let o=n.target.value,s=this.inputValue();o!==s&&(this.focusedOptionIndex.set(this.asFreeText()?-1:0),this.inputValue.set(o),this.updateInputElValue());}),t.addEventListener("inputValueChanged",n=>{let o=n.detail.value,s=this.inputValue(),c=me(()=>this.selectedOptions().length);o===s&&(o!==""||c>0)||(this.setSelectedOptionsFromValue(o),this.setInputValueFromOptions(this.selectedOptions()),this.#a());}),t):(console.warn("<sh-select> input element not found are you missing to pass an <input> or <textarea> element to select component?"),null)}),this.focusEffect=Ga(()=>{let e=this.inputRefEl();if(!e)return;let t=this.focusedOptionIndex();t>=0||t===-1&&this.asFreeText()?e.setAttribute("aria-activedescendant",this.getOptionId(t)):e.removeAttribute("aria-activedescendant");}),this.openAbortController=null,this.isOpenEffect=Ga(()=>{if(this.isOpen()){this.openAbortController||(this.openAbortController=new AbortController);let t=this.inputRefEl(),o=this.asFreeText()?-1:0;if(!t)return;t.setAttribute("aria-expanded",this.isOpen().toString()),t.addEventListener("keydown",s=>{if((this.#n.matches(s,"select.close")||s.key==="Tab")&&(s.preventDefault(),this.close()),this.#n.matches(s,"select.select")&&(!(s.key===" "||s.key==="Spacebar")||!this.hasSearch())&&(s.preventDefault(),this.isLoading()?this.#t=true:this.toggleOptionByIndex(this.focusedOptionIndex(),void 0,true)),this.#n.matches(s,"select.next")){s.preventDefault();let c=this.focusedOptionIndex()+1;this.focusedOptionIndex.set(c>this.filteredOptions().length-1?o:c);}else if(this.#n.matches(s,"select.prev")){s.preventDefault();let c=this.focusedOptionIndex()-1;this.focusedOptionIndex.set(c<o?this.filteredOptions().length-1:c);}},{signal:this.openAbortController?.signal});}else {let t=this.inputRefEl();if(!t)return;t.setAttribute("aria-expanded",this.isOpen().toString()),this.openAbortController&&(this.openAbortController.abort(),this.openAbortController=null);}}),this.#r=Ga(()=>{let e=this.isLoading(),t=this.filteredOptions();me(()=>{!e&&this.#t&&(this.#t=false,t.length>0&&this.toggleOptionByIndex(0,void 0,true));});}),this._inputValue="",this.inputValueEffect=Ga(()=>{let e=this.inputValue();this._inputValue=e;}),this.inputRefElEffect=Ga(()=>{let e=this.inputRefEl();if(!e)return;let t=me(()=>this.selectedOptions().length);e.value===this._inputValue&&(e.value!==""||t>0)||(this.disabled.set(e.disabled),me(()=>{this.setSelectedOptionsFromValue(e.value),this.setInputValueFromOptions(this.selectedOptions());}));}),this.inputReadonlyEffect=Ga(()=>{let e=this.inputRefEl();if(!e)return;this.readonly()||!this.hasSearch()?e.setAttribute("readonly","true"):e.removeAttribute("readonly");}),this.selectedLabels=Nt$1(()=>{let e=this.selectedOptions();return this.label()?e.map(n=>this.getLabel(n)).join(", "):e.join(", ")}),this.inputState=Nt$1(()=>(this.selectedOptions().length>0||this.asFreeText()&&this.inputValue().length>0)&&!this.isOpen()?"selected":this.isLoading()?"loading":this.isOpen()&&(this.lazySearch()||this.inlineSearch())?"open-searching":this.isOpen()?"open":this.inlineSearch()||this.lazySearch()?"searching":"closed"),this.hasSearch=Nt$1(()=>this.inlineSearch()||this.lazySearch()),this.#c=Ga(()=>{if(this.selectMultiple()&&this.hasSearch())return;let e=this.selectedOptions(),t=this.value(),n=e.map(o=>t?this.#e(o,t):o).join(",");this.inputValue.set(n);});}#i;#n;#o;#t;#s;#l(e,t){if(!t)return 0;let n=0,o=-1,s=0,c=true;for(let C=0;C<t.length;C++){let _=t[C];if(e.length>o+1&&e[o+1]===_)n+=C===0?100:150,o++,s++;else {let p=e.indexOf(_,o+1);if(C>0&&(c=false),p===-1)return 0;n+=100,o=p,s++;}}return c&&t.length===s&&(n+=1e3),n+=s*20,n}#r;#c;ngOnInit(){this.setInitInput();}setInitInput(){let e=this.#i.nativeElement.querySelector("input");if(e){this.inputRefInput.set(new Jr(e));return}let t=this.#i.nativeElement.querySelector("textarea");if(t){this.inputRefInput.set(new Jr(t));return}typeof MutationObserver<"u"&&this.#s.observe(this.#i.nativeElement,{attributes:true,childList:true,subtree:true,characterData:true});}setSelectedOptionsFromValue(e){let t=this.options()||[],n=this.value(),o=this.selectMultiple(),s=e.toString().split(",");if(s.length===0){this.selectedOptions.set([]);return}let c=o?s:[s[0]],C=t.filter(p=>{let h=n?this.#e(p,n)?.toString():p?.toString();return h!=null&&c.includes(h)}),_=C.length>0;this.selectedOptions.set(o?C:_?[C[0]]:[]);}setInputValueFromOptions(e){let t=this.value();if(e.length===0){this.inputValue.set(""),this.updateInputElValue();return}let n=e.map(o=>t?this.#e(o,t):o).join(",");n!==this.inputValue()&&(this.inputValue.set(n),this.updateInputElValue());}getValue(e){let t=this.value();return t?this.#e(e,t):e}getLabel(e){let t=this.label();return t?this.#e(e,t):e}getOptionId(e){return `opt-${this.componentId}-${e}`}toggleOptionByIndex(e,t,n=false){let o=this.filteredOptions()[e];if(this.asFreeText()&&e===-1){let h=this.computedFreeTextOption(),b=this.getValue(h);if(!(this.validateFreeText()??(z=>true))(b))return;this.options.update(z=>z.findIndex(ye=>this.getValue(ye)===b)>-1?z:(this.onAddNewFreeTextOption.emit(b),[h,...z])),e=0,o=h;}else if(!o){this.close();return}t&&t.stopPropagation();let s=this.selectMultiple(),c=this._isClearable(),C=this.value(),_=this.selectedOptionValues(),p=C?this.#e(o,C):o;this.prevInputValue.set(null),this.#o.set(null),this.selectedOptions.update(h=>{let b=_.indexOf(p);if(b>-1){let y=[...h.slice(0,b),...h.slice(b+1)];return c||y.length>0?y:h}else return this.focusedOptionIndex.set(e),s?[...h,o]:[o]}),s?this.inputRefEl()?.focus():this.isOpen.set(false),this.setInputValueFromOptions(this.selectedOptions()),s&&this.hasSearch()&&(this.inputValue.set(""),this.updateInputElValue());}removeSelectedOptionByIndex(e,t){e.stopPropagation(),this.selectedOptions.update(n=>[...n.slice(0,t),...n.slice(t+1)]),this.setInputValueFromOptions(this.selectedOptions());}isSelected(e){let t=this.value(),n=this.filteredOptions()[e],o=t?this.#e(n,t):n;return this.selectedOptionValues().indexOf(o)>-1}open(){this.isOpen()||(this.#t=false,this.isOpen.set(true),this.hasSearch()?(this.prevInputValue.set(this.inputValue()??""),this.inputValue.set(""),this.updateInputElValue()):this.#o.set(this.selectedOptions()),this.selectMultiple()||this.#a());}#a(){let e=this.selectedOptionValues()[0],t=this.value();if(e){let n=this.filteredOptions().findIndex(o=>t?this.#e(o,t)===e:o===e);this.focusedOptionIndex.set(n);}else this.focusedOptionIndex.set(-1);}close(){this.#t=false,this.isOpen.set(false);let e=this.prevInputValue(),t=this.#o();if(this.asFreeText()&&!this.selectMultiple()){this.updateInputElValue();return}this.hasSearch()&&e&&(this.inputValue.set(e),this.setInputValueFromOptions(this.selectedOptions())),!this.hasSearch()&&t!==null&&this.setInputValueFromOptions(t),this.selectMultiple()&&this.setInputValueFromOptions(this.selectedOptions());}clear(e){e?.stopPropagation(),this.#t=false,this.inputValue.set(""),this.selectedOptions.set([]),this.isOpen.set(false),this.prevInputValue.set(null),this.cleared.emit(),this.updateInputElValue();}updateInputElValue(){let e=this.inputRefEl(),t=this.inputValue();!e||e.value===t||(e.value=t,e.dispatchEvent(new Event("input")));}#e(e,t){return t.split(".").reduce((n,o)=>n?.[o],e)}#p(e){Object.defineProperty(e,"value",{configurable:true,get(){return Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),"value").get.call(this)},set(t){Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),"value").set.call(this,t);let o=new CustomEvent("inputValueChanged",{bubbles:true,cancelable:true,detail:{value:t}});return this.dispatchEvent(o),t}});}#d(e){let t=(e??"").toLowerCase(),n="^";for(let o of t)n+=".*"+this.#u(o);return n+=".*$",new RegExp(n,"i")}#u(e){return e.replace(/[-\/\\^$+?.()|[\]{}]/g,"\\$&")}ngOnDestroy(){this.openAbortController&&(this.openAbortController.abort(),this.openAbortController=null),typeof MutationObserver<"u"&&this.#s.disconnect();}static{this.\u0275fac=function(t){return new(t||i)};}static{this.\u0275cmp=dw({type:i,selectors:[["sh-select"]],contentQueries:function(t,n,o){t&1&&Bg(o,n.inlineTemplate,$r,5),t&2&&lC();},viewQuery:function(t,n){t&1&&$g(n.optionsWrapRef,Ve,5),t&2&&lC();},hostVars:4,hostBindings:function(t,n){t&2&&(bC(n.hostClasses()),Qg("multiple",n.selectMultiple()));},inputs:{value:[1,"value"],label:[1,"label"],asFreeText:[1,"asFreeText"],color:[1,"color"],variant:[1,"variant"],size:[1,"size"],optionTitle:[1,"optionTitle"],freeTextTitle:[1,"freeTextTitle"],freeTextPlaceholder:[1,"freeTextPlaceholder"],validateFreeText:[1,"validateFreeText"],placeholder:[1,"placeholder"],readonly:[1,"readonly"],disabled:[1,"disabled"],lazySearch:[1,"lazySearch"],inlineSearch:[1,"inlineSearch"],asText:[1,"asText"],isClearable:[1,"isClearable"],selectMultiple:[1,"selectMultiple"],optionTemplate:[1,"optionTemplate"],selectedOptionTemplate:[1,"selectedOptionTemplate"],placeholderTemplate:[1,"placeholderTemplate"],freeTextOptionTemplate:[1,"freeTextOptionTemplate"],isOpen:[1,"isOpen"],isLoading:[1,"isLoading"],options:[1,"options"],selectedOptions:[1,"selectedOptions"]},outputs:{readonly:"readonlyChange",disabled:"disabledChange",isOpen:"isOpenChange",isLoading:"isLoadingChange",options:"optionsChange",selectedOptions:"selectedOptionsChange",cleared:"cleared",onAddNewFreeTextOption:"onAddNewFreeTextOption"},ngContentSelectors:we,decls:33,vars:29,consts:[["formFieldWrapper",""],["optionsWrap",""],[3,"isOpenChange","closed","isOpen","disableOpenByClick","options"],["trigger","",3,"click","color","variant","size"],["ngProjectAs","input",5,["input"],1,"input"],[1,"selected-value"],["suffix",""],["suffix","",1,"primary"],["role","listbox",1,"ship-options",3,"id"],["title",""],["role","option",1,"option",3,"id","selected","focused"],[1,"small",3,"class"],[1,"small",3,"click"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[4,"ngTemplateOutlet"],["suffix","",3,"click"],["role","option",1,"option",3,"click","id"],[3,"class","checked"],[3,"checked"]],template:function(t,n){if(t&1){let o=gT();oC(Ie),cm(0)(1)(2)(3)(4)(5)(6),Qi(7,"sh-popover",2,0),sm("isOpenChange",function(c){return Sd(o),HC(n.isOpen,c)||(n.isOpen=c),xd(c)}),Fg("closed",function(){return n.close()}),Qi(9,"sh-form-field",3),Fg("click",function(){return n.open()}),iC(10,0,Me),iC(11,1,Fe),iC(12,2,Ee),Qi(13,"div",4)(14,"div",5),oT(15,De,1,1)(16,qe,2,0)(17,Xe,2,1),iC(18,3),iC(19,4),Hl()(),oT(20,Ge,2,0,"sh-icon",6)(21,Je,1,0,"sh-spinner",7)(22,Ye,2,0,"sh-icon",6)(23,Ze,2,0,"sh-icon",6)(24,et,2,0,"sh-icon",6)(25,tt,2,0,"sh-icon",6)(26,it,2,0,"sh-icon",6),Hl(),Qi(27,"div",8,1),oT(29,dt,3,3),oT(30,ut,2,1,"p",9),cT(31,xt,4,8,"li",10,sT),Hl()();}if(t&2){BC(n.placeholderTemplate());let o=n.optionTemplate();DE(),BC(n.freeTextOptionTemplate());let s=n.selectedOptionTemplate(),c=n.inlineTemplate();DE();let C=BC(n.selectedOptions()),_=n.inputState();DE(),BC(s||o||c),DE(),BC(o||c),DE(),BC(!n.asText()&&n.selectMultiple()),DE();let p=BC(n.isOpen()&&n.hasSearch());DE(),im("isOpen",n.isOpen),gg("disableOpenByClick",true)("options",QC(28,Le)),DE(2),Qg("stretch",n.stretch())("small",n.small())("readonly",n.readonly()||n.disabled()),gg("color",n.color())("variant",n.variant())("size",n.size()),DE(4),Qg("show-search-text",p),DE(),Qg("is-selected",_==="selected"),DE(),iT(n.asFreeText()&&n.inputValue().length>0&&!n.isOpen()?15:C.length>0?16:p?-1:17),DE(5),iT(_==="closed"?20:_==="loading"?21:_==="open-searching"?22:_==="searching"?23:_==="selected"&&n._isClearable()?24:_==="selected"&&!n._isClearable()?25:26),DE(7),gg("id","optionsWrapId-"+n.componentId),DE(2),iT(n.asFreeText()?29:-1),DE(),iT(n.optionTitle()&&n.filteredOptions().length>0?30:-1),DE(),lT(n.filteredOptions());}},dependencies:[ei,oe,Fe$1,N$1,U,m,D,c],styles:[`sh-select{--miw: 13.125rem;--select-option-mih: min-content;--select-options-mh: 11.25rem;display:flex}sh-select sh-form-field{display:flex;--ff-mw: var(--miw)}sh-select sh-popover{flex:1 0}sh-select sh-popover:has(.ship-options:empty) .popover{opacity:0}sh-select .selected-value{width:100%;display:flex;flex-wrap:wrap;align-items:center;gap:.25rem;color:var(--base-8)}sh-select .selected-value input{margin:0}sh-select .selected-value.is-selected{color:var(--base-12)}sh-select sh-form-field .input-wrap .input{position:relative;display:flex;flex-wrap:wrap;--ff-space: .4375rem .625rem}sh-select sh-form-field .input-wrap .input textarea,sh-select sh-form-field .input-wrap .input input{opacity:0;width:0;height:0;position:absolute}sh-select sh-form-field .input-wrap .input.show-search-text input{opacity:1;height:initial;min-width:min-content;field-sizing:content;font:var(--paragraph-30);position:relative}sh-select sh-form-field .input-wrap .input.show-search-text textarea{opacity:1;height:initial;margin:.25rem 0 0}sh-select sh-form-field.small .input-wrap .input{--ff-space: .3125rem .5rem}sh-select sh-form-field.small .input-wrap .input sh-chip{--chip-h: 1.25rem;font-size:80%}.ship-options{padding:.5rem 0;display:flex;flex-direction:column;max-height:var(--select-options-mh);overflow-y:auto;overflow-x:hidden}.ship-options p[title]{padding:.25rem 1rem}.ship-options sh-divider{margin:.5rem 0}.ship-options .option{display:flex;justify-content:flex-start;align-items:center;min-height:var(--select-option-mih);margin:0 .5rem;padding:.5rem;gap:.5rem;width:calc(100% - 1rem);border-radius:var(--shape-2);appearance:none;background-color:transparent;border:0;cursor:pointer;color:var(--base-12);-webkit-user-select:none;user-select:none}.ship-options .option[disabled]{opacity:.3;cursor:initial}.ship-options .option[disabled]:hover{background-color:transparent}.ship-options .option sh-icon{font-size:1rem}.ship-options .option span.placeholder{color:var(--base-7)}.ship-options .option.active,.ship-options .option:checked,.ship-options .option:hover{background-color:var(--base-2);color:var(--base-12)}.ship-options .option.focused{background-color:var(--primary-1);color:var(--base-12)}.ship-options .option.focused:hover{background-color:var(--primary-2)}
1
+ import {c}from'./chunk-COgNe44h.js';import {b as g1,b8 as ce,d as dw,h as bC,T,ae as Jr,bu as N,af as m1,ac as h1,N as Nt$1,U as Ue$1,c6 as I1,bY as $r,B as y1,bv as le,c as me,G as Ga,bZ as ei,f as N$1,k as gT,L as oC,ak as cm,Q as Qi,s as sm,S as Sd,l as HC,x as xd,F as Fg,Y as iC,o as oT,H as Hl,a1 as cT,al as BC,D as DE,w as im,z as gg,a3 as QC,I as Qg,i as iT,a2 as lT,$ as $g,K as lC,c7 as Bg,ap as sT,q as PC,n as nC,aa as Gl,ao as $C,j as mg,E as nm,aC as hg,bf as ig,a_ as ZC,b_ as Ig,aF as YC}from'./main-PXGZLKMN.js';import {D}from'./chunk-BAZ5npJw.js';import {U}from'./chunk-CMmgPgiU.js';import {o as oe,F as Fe$1}from'./chunk-C9EdrQe6.js';var m=(()=>{class n{constructor(){this.color=g1(null),this.hostClasses=ce("spinner",{color:this.color});}static{this.\u0275fac=function(e){return new(e||n)};}static{this.\u0275cmp=dw({type:n,selectors:[["sh-spinner"]],hostAttrs:["role","status","aria-busy","true"],hostVars:2,hostBindings:function(e,s){e&2&&bC(s.hostClasses());},inputs:{color:[1,"color"]},decls:0,vars:0,template:function(e,s){},styles:[`sh-spinner{--spinner-c: var(--base-8);--spinner-size: 2.5rem;--spinner-thickness: .3125rem;width:var(--spinner-size);height:var(--spinner-size);display:grid;place-content:center;color:var(--spinner-c);position:relative}sh-spinner:before{content:"";width:var(--spinner-size);height:var(--spinner-size);border:var(--spinner-thickness) solid currentColor;border-bottom-color:transparent;border-radius:50%;display:flex;box-sizing:border-box;animation:rotation 1s linear infinite;margin:auto;inset:0;position:absolute}sh-spinner.primary{--spinner-c: var(--primary-8)}sh-spinner.accent{--spinner-c: var(--accent-8)}sh-spinner.warn{--spinner-c: var(--warn-8)}sh-spinner.error{--spinner-c: var(--error-8)}sh-spinner.success{--spinner-c: var(--success-8)}
2
+ `],encapsulation:2});}}return n})();var Ve=["optionsWrap"],Ie=[[["label"]],[["","prefix",""]],[["","boxPrefix",""]],[["input"]],[["textarea"]]],we=["label","[prefix]","[boxPrefix]","input","textarea"],Me=["ngProjectAs","label",5,["label"]],Fe=["ngProjectAs","[prefix]",5,["","prefix",""]],Ee=["ngProjectAs","[boxPrefix]",5,["","boxPrefix",""]],Le=()=>({closeOnButton:false,closeOnEsc:false}),Te=(i,l)=>({$implicit:i,last:l}),ie=i=>({$implicit:i});function De(i,l){if(i&1&&PC(0),i&2){let e=nC();Gl(" ",e.spacedSelectedOptions()," ");}}function Ne(i,l){i&1&&Ig(0);}function Ae(i,l){if(i&1&&ig(0,Ne,1,0,"ng-container",13),i&2){let e=nC(3),t=e.$implicit,n=e.$index,o=e.$count;nC(2);let s=$C(3);gg("ngTemplateOutlet",s)("ngTemplateOutletContext",YC(2,Te,t,n===o-1));}}function ke(i,l){if(i&1&&PC(0),i&2){let e=nC(3).$implicit,t=nC(2);Gl(" ",t.getLabel(e)," ");}}function $e(i,l){if(i&1){let e=gT();Qi(0,"sh-chip",12),Fg("click",function(n){Sd(e);let o=nC(2).$index,s=nC(2);return xd(s.removeSelectedOptionByIndex(n,o))}),oT(1,Ae,1,5,"ng-container")(2,ke,1,1),Qi(3,"sh-icon"),PC(4,"x-bold"),Hl()();}if(i&2){let e=nC(4),t=$C(3);bC(e.selectClasses()),DE(),iT(t?1:2);}}function Re(i,l){i&1&&Ig(0);}function Pe(i,l){if(i&1&&ig(0,Re,1,0,"ng-container",13),i&2){let e=nC(4),t=e.$implicit,n=e.$index,o=e.$count;nC(2);let s=$C(3);gg("ngTemplateOutlet",s)("ngTemplateOutletContext",YC(2,Te,t,n===o-1));}}function je(i,l){if(i&1&&PC(0),i&2){let e=nC(4),t=e.$implicit,n=e.$index,o=e.$count,s=nC(2);Gl(" ",n===o-1?s.getLabel(t):s.getLabel(t)+","," ");}}function ze(i,l){if(i&1&&oT(0,Pe,1,5,"ng-container")(1,je,1,1),i&2){nC(5);let e=$C(3);iT(e?0:1);}}function Be(i,l){if(i&1&&oT(0,ze,2,1),i&2){nC(4);let e=$C(6);iT(e?-1:0);}}function Ke(i,l){if(i&1&&oT(0,$e,5,3,"sh-chip",11)(1,Be,1,1),i&2){nC(3);let e=$C(5);iT(e?0:1);}}function We(i,l){if(i&1&&oT(0,Ke,2,1),i&2){let e=l.$implicit;iT(e?0:-1);}}function qe(i,l){if(i&1&&cT(0,We,1,1,null,null,sT),i&2){nC();let e=$C(2);lT(e);}}function Qe(i,l){i&1&&Ig(0);}function Ue(i,l){if(i&1&&ig(0,Qe,1,0,"ng-container",14),i&2){nC(2);let e=$C(0);gg("ngTemplateOutlet",e);}}function He(i,l){if(i&1&&PC(0),i&2){let e=nC(2);Gl(" ",e.placeholderText()??""," ");}}function Xe(i,l){if(i&1&&oT(0,Ue,1,1,"ng-container")(1,He,1,1),i&2){nC();let e=$C(0);iT(e?0:1);}}function Ge(i,l){i&1&&(Qi(0,"sh-icon",6),PC(1,"caret-down"),Hl());}function Je(i,l){i&1&&mg(0,"sh-spinner",7);}function Ye(i,l){i&1&&(Qi(0,"sh-icon",6),PC(1,"list-magnifying-glass"),Hl());}function Ze(i,l){i&1&&(Qi(0,"sh-icon",6),PC(1,"magnifying-glass"),Hl());}function et(i,l){if(i&1){let e=gT();Qi(0,"sh-icon",15),Fg("click",function(n){Sd(e);let o=nC();return xd(o.clear(n))}),PC(1,"x-bold"),Hl();}}function tt(i,l){i&1&&(Qi(0,"sh-icon",6),PC(1,"caret-down"),Hl());}function it(i,l){i&1&&(Qi(0,"sh-icon",6),PC(1,"caret-up"),Hl());}function nt(i,l){if(i&1&&(Qi(0,"p",9),PC(1),Hl()),i&2){let e=nC(3);DE(),nm(e.freeTextTitle());}}function ot(i,l){i&1&&Ig(0);}function st(i,l){if(i&1&&ig(0,ot,1,0,"ng-container",13),i&2){nC(2);let e=$C(0);nC();let t=$C(1);gg("ngTemplateOutlet",t)("ngTemplateOutletContext",ZC(2,ie,e));}}function lt(i,l){i&1&&Ig(0);}function at(i,l){if(i&1&&ig(0,lt,1,0,"ng-container",13),i&2){nC(2);let e=$C(0);nC();let t=$C(4);gg("ngTemplateOutlet",t)("ngTemplateOutletContext",ZC(2,ie,e));}}function rt(i,l){if(i&1&&PC(0),i&2){nC(2);let e=$C(1);Gl(" ",e," ");}}function ct(i,l){i&1&&mg(0,"sh-divider");}function pt(i,l){if(i&1){let e=gT();oT(0,nt,2,1,"p",9),Qi(1,"li",16),Fg("click",function(){Sd(e);let n=nC(2);return xd(n.toggleOptionByIndex(-1))}),oT(2,st,1,4,"ng-container")(3,at,1,4,"ng-container")(4,rt,1,1),Hl(),oT(5,ct,1,0,"sh-divider");}if(i&2){let e=nC(2),t=$C(1),n=$C(4);iT(e.freeTextTitle()?0:-1),DE(),Qg("selected",e.isSelected(-1))("focused",e.focusedOptionIndex()===-1),gg("id",e.getOptionId(-1)),hg("aria-selected",e.isSelected(-1)),DE(),iT(t?2:n?3:4),DE(3),iT(e.freeTextTitle()&&e.filteredOptions().length>0?5:-1);}}function dt(i,l){if(i&1&&(cm(0)(1),oT(2,pt,6,9)),i&2){let e=nC(),t=BC(e.computedFreeTextOption());DE();let n=BC(e.getValue(t));DE(),iT(n.length>0?2:-1);}}function ut(i,l){if(i&1&&(Qi(0,"p",9),PC(1),Hl()),i&2){let e=nC();DE(),nm(e.optionTitle());}}function ht(i,l){if(i&1&&mg(0,"sh-checkbox",18),i&2){let e=nC().$index,t=nC();bC(t.selectClasses()),gg("checked",t.isSelected(e));}}function _t(i,l){i&1&&Ig(0);}function ft(i,l){if(i&1&&ig(0,_t,1,0,"ng-container",13),i&2){let e=nC().$implicit;nC();let t=$C(4);gg("ngTemplateOutlet",t)("ngTemplateOutletContext",ZC(2,ie,e));}}function mt(i,l){if(i&1&&PC(0),i&2){let e=nC().$implicit,t=nC();Gl(" ",t.getLabel(e)," ");}}function xt(i,l){if(i&1){let e=gT();Qi(0,"li",16),Fg("click",function(){let n=Sd(e).$index,o=nC();return xd(o.toggleOptionByIndex(n))}),oT(1,ht,1,3,"sh-checkbox",17),oT(2,ft,1,4,"ng-container")(3,mt,1,1),Hl();}if(i&2){let e=l.$index,t=nC(),n=$C(4);Qg("selected",t.isSelected(e))("focused",e===t.focusedOptionIndex()),gg("id",t.getOptionId(e)),hg("aria-selected",t.isSelected(e)),DE(),iT(t.selectMultiple()?1:-1),DE(),iT(n?2:3);}}var Nt=(()=>{class i{constructor(){this.#i=T(Jr),this.#n=T(N),this.value=g1(),this.label=g1(),this.asFreeText=g1(false),this.color=g1(null),this.variant=g1(null),this.size=g1(null),this.optionTitle=g1(null),this.freeTextTitle=g1(null),this.freeTextPlaceholder=g1("Type to create a new option"),this.validateFreeText=g1(),this.placeholder=g1(),this.readonly=m1(false),this.disabled=m1(false),this.hostClasses=ce("select",{color:this.color,variant:this.variant,size:this.size,readonly:this.readonly}),this.lazySearch=g1(false),this.inlineSearch=g1(false),this.asText=g1(false),this.isClearable=g1(true),this.selectMultiple=g1(false),this.optionTemplate=g1(null),this.selectedOptionTemplate=g1(null),this.placeholderTemplate=g1(null),this.freeTextOptionTemplate=g1(null),this.isOpen=m1(false),this.isLoading=m1(false),this.options=m1([]),this.selectedOptions=m1([]),this.cleared=h1(),this.onAddNewFreeTextOption=h1(),this.spacedSelectedOptions=Nt$1(()=>{let e=this.selectedOptions(),t=this.value();return e.map(n=>t?this.#e(n,t):n).join(", ")}),this.computedFreeTextOption=Nt$1(()=>{let e=this.inputValue(),t=this.value(),n=t?{}:e;return t&&typeof n=="object"&&(n[t]=e),n}),this.#o=Ue$1(null),this.#t=false,this.inlineTemplate=I1($r),this.optionsWrapRef=y1.required("optionsWrap"),this.inputRefInput=Ue$1(null),this.#s=typeof MutationObserver<"u"?new MutationObserver(e=>{for(var t of e)t&&(t.target.nodeName==="INPUT"||t.target.nodeName==="TEXTAREA")&&(this.inputRefInput.set(new Jr(t.target)),this.#s.disconnect());}):void 0,this.inputValue=Ue$1(""),this.prevInputValue=Ue$1(null),this.focusedOptionIndex=Ue$1(-1),this._isClearable=Nt$1(()=>this.selectMultiple()||this.isClearable()),this.selectClasses=Nt$1(()=>this.#i.nativeElement.classList.toString()),this.stretch=Nt$1(()=>this.selectClasses().includes("stretch")),this.small=Nt$1(()=>this.selectClasses().includes("small")),this.placeholderText=Nt$1(()=>{let e=this.placeholder(),t=this.inputRefEl();return e||t?.placeholder||null}),this.selectedOptionValues=Nt$1(()=>{let e=this.selectedOptions(),t=this.value();return t?e.map(n=>this.#e(n,t)):e}),this.filteredOptions=Nt$1(()=>{let e=this.options()||[],t=this.label(),n=this.value(),o=this.inlineSearch(),s=this.inputValue().toLowerCase(),c=this.#d(s);if(e.length<=0)return [];if(!o||s==="")return e;let _=e.filter(p=>{let h=t?(this.#e(p,t)??"").toString().toLowerCase():(p??"").toString().toLowerCase(),b=((n?this.#e(p,n):p)??"").toString().toLowerCase(),y=c.test(h),j=c.test(b);return y||j}).map(p=>{let h=t?(this.#e(p,t)??"").toString().toLowerCase():(p??"").toString().toLowerCase(),b=((n?this.#e(p,n):p)??"").toString().toLowerCase(),y=this.#l(h,s),j=this.#l(b,s);return {item:p,score:Math.max(y,j)}});return _.sort((p,h)=>h.score-p.score),_.map(p=>p.item)}),this.componentId=le(),this.inputRefEl=Nt$1(()=>{let e=this.inputRefInput();if(e===null)return;let t=e?e.nativeElement:null;return t?(t.autocomplete="off",t.setAttribute("role","combobox"),t.setAttribute("id",`combobox-${this.componentId}`),t.setAttribute("aria-haspopup","listbox"),t.setAttribute("aria-owns",`optionsWrapId-${this.componentId}`),t.setAttribute("aria-controls",`optionsWrapId-${this.componentId}`),this.#p(t),t.addEventListener("focus",()=>{this.readonly()||this.open();}),t.addEventListener("input",n=>{let o=n.target.value,s=this.inputValue();o!==s&&(this.focusedOptionIndex.set(this.asFreeText()?-1:0),this.inputValue.set(o),this.updateInputElValue());}),t.addEventListener("inputValueChanged",n=>{let o=n.detail.value,s=this.inputValue(),c=me(()=>this.selectedOptions().length);o===s&&(o!==""||c>0)||(this.setSelectedOptionsFromValue(o),this.setInputValueFromOptions(this.selectedOptions()),this.#a());}),t):(console.warn("<sh-select> input element not found are you missing to pass an <input> or <textarea> element to select component?"),null)}),this.focusEffect=Ga(()=>{let e=this.inputRefEl();if(!e)return;let t=this.focusedOptionIndex();t>=0||t===-1&&this.asFreeText()?e.setAttribute("aria-activedescendant",this.getOptionId(t)):e.removeAttribute("aria-activedescendant");}),this.openAbortController=null,this.isOpenEffect=Ga(()=>{if(this.isOpen()){this.openAbortController||(this.openAbortController=new AbortController);let t=this.inputRefEl(),o=this.asFreeText()?-1:0;if(!t)return;t.setAttribute("aria-expanded",this.isOpen().toString()),t.addEventListener("keydown",s=>{if((this.#n.matches(s,"select.close")||s.key==="Tab")&&(s.preventDefault(),this.close()),this.#n.matches(s,"select.select")&&(!(s.key===" "||s.key==="Spacebar")||!this.hasSearch())&&(s.preventDefault(),this.isLoading()?this.#t=true:this.toggleOptionByIndex(this.focusedOptionIndex(),void 0,true)),this.#n.matches(s,"select.next")){s.preventDefault();let c=this.focusedOptionIndex()+1;this.focusedOptionIndex.set(c>this.filteredOptions().length-1?o:c);}else if(this.#n.matches(s,"select.prev")){s.preventDefault();let c=this.focusedOptionIndex()-1;this.focusedOptionIndex.set(c<o?this.filteredOptions().length-1:c);}},{signal:this.openAbortController?.signal});}else {let t=this.inputRefEl();if(!t)return;t.setAttribute("aria-expanded",this.isOpen().toString()),this.openAbortController&&(this.openAbortController.abort(),this.openAbortController=null);}}),this.#r=Ga(()=>{let e=this.isLoading(),t=this.filteredOptions();me(()=>{!e&&this.#t&&(this.#t=false,t.length>0&&this.toggleOptionByIndex(0,void 0,true));});}),this._inputValue="",this.inputValueEffect=Ga(()=>{let e=this.inputValue();this._inputValue=e;}),this.inputRefElEffect=Ga(()=>{let e=this.inputRefEl();if(!e)return;let t=me(()=>this.selectedOptions().length);e.value===this._inputValue&&(e.value!==""||t>0)||(this.disabled.set(e.disabled),me(()=>{this.setSelectedOptionsFromValue(e.value),this.setInputValueFromOptions(this.selectedOptions());}));}),this.inputReadonlyEffect=Ga(()=>{let e=this.inputRefEl();if(!e)return;this.readonly()||!this.hasSearch()?e.setAttribute("readonly","true"):e.removeAttribute("readonly");}),this.selectedLabels=Nt$1(()=>{let e=this.selectedOptions();return this.label()?e.map(n=>this.getLabel(n)).join(", "):e.join(", ")}),this.inputState=Nt$1(()=>(this.selectedOptions().length>0||this.asFreeText()&&this.inputValue().length>0)&&!this.isOpen()?"selected":this.isLoading()?"loading":this.isOpen()&&(this.lazySearch()||this.inlineSearch())?"open-searching":this.isOpen()?"open":this.inlineSearch()||this.lazySearch()?"searching":"closed"),this.hasSearch=Nt$1(()=>this.inlineSearch()||this.lazySearch()),this.#c=Ga(()=>{if(this.selectMultiple()&&this.hasSearch())return;let e=this.selectedOptions(),t=this.value(),n=e.map(o=>t?this.#e(o,t):o).join(",");this.inputValue.set(n);});}#i;#n;#o;#t;#s;#l(e,t){if(!t)return 0;let n=0,o=-1,s=0,c=true;for(let C=0;C<t.length;C++){let _=t[C];if(e.length>o+1&&e[o+1]===_)n+=C===0?100:150,o++,s++;else {let p=e.indexOf(_,o+1);if(C>0&&(c=false),p===-1)return 0;n+=100,o=p,s++;}}return c&&t.length===s&&(n+=1e3),n+=s*20,n}#r;#c;ngOnInit(){this.setInitInput();}setInitInput(){let e=this.#i.nativeElement.querySelector("input");if(e){this.inputRefInput.set(new Jr(e));return}let t=this.#i.nativeElement.querySelector("textarea");if(t){this.inputRefInput.set(new Jr(t));return}typeof MutationObserver<"u"&&this.#s.observe(this.#i.nativeElement,{attributes:true,childList:true,subtree:true,characterData:true});}setSelectedOptionsFromValue(e){let t=this.options()||[],n=this.value(),o=this.selectMultiple(),s=e.toString().split(",");if(s.length===0){this.selectedOptions.set([]);return}let c=o?s:[s[0]],C=t.filter(p=>{let h=n?this.#e(p,n)?.toString():p?.toString();return h!=null&&c.includes(h)}),_=C.length>0;this.selectedOptions.set(o?C:_?[C[0]]:[]);}setInputValueFromOptions(e){let t=this.value();if(e.length===0){this.inputValue.set(""),this.updateInputElValue();return}let n=e.map(o=>t?this.#e(o,t):o).join(",");n!==this.inputValue()&&(this.inputValue.set(n),this.updateInputElValue());}getValue(e){let t=this.value();return t?this.#e(e,t):e}getLabel(e){let t=this.label();return t?this.#e(e,t):e}getOptionId(e){return `opt-${this.componentId}-${e}`}toggleOptionByIndex(e,t,n=false){let o=this.filteredOptions()[e];if(this.asFreeText()&&e===-1){let h=this.computedFreeTextOption(),b=this.getValue(h);if(!(this.validateFreeText()??(z=>true))(b))return;this.options.update(z=>z.findIndex(ye=>this.getValue(ye)===b)>-1?z:(this.onAddNewFreeTextOption.emit(b),[h,...z])),e=0,o=h;}else if(!o){this.close();return}t&&t.stopPropagation();let s=this.selectMultiple(),c=this._isClearable(),C=this.value(),_=this.selectedOptionValues(),p=C?this.#e(o,C):o;this.prevInputValue.set(null),this.#o.set(null),this.selectedOptions.update(h=>{let b=_.indexOf(p);if(b>-1){let y=[...h.slice(0,b),...h.slice(b+1)];return c||y.length>0?y:h}else return this.focusedOptionIndex.set(e),s?[...h,o]:[o]}),s?this.inputRefEl()?.focus():this.isOpen.set(false),this.setInputValueFromOptions(this.selectedOptions()),s&&this.hasSearch()&&(this.inputValue.set(""),this.updateInputElValue());}removeSelectedOptionByIndex(e,t){e.stopPropagation(),this.selectedOptions.update(n=>[...n.slice(0,t),...n.slice(t+1)]),this.setInputValueFromOptions(this.selectedOptions());}isSelected(e){let t=this.value(),n=this.filteredOptions()[e],o=t?this.#e(n,t):n;return this.selectedOptionValues().indexOf(o)>-1}open(){this.isOpen()||(this.#t=false,this.isOpen.set(true),this.hasSearch()?(this.prevInputValue.set(this.inputValue()??""),this.inputValue.set(""),this.updateInputElValue()):this.#o.set(this.selectedOptions()),this.selectMultiple()||this.#a());}#a(){let e=this.selectedOptionValues()[0],t=this.value();if(e){let n=this.filteredOptions().findIndex(o=>t?this.#e(o,t)===e:o===e);this.focusedOptionIndex.set(n);}else this.focusedOptionIndex.set(-1);}close(){this.#t=false,this.isOpen.set(false);let e=this.prevInputValue(),t=this.#o();if(this.asFreeText()&&!this.selectMultiple()){this.updateInputElValue();return}this.hasSearch()&&e&&(this.inputValue.set(e),this.setInputValueFromOptions(this.selectedOptions())),!this.hasSearch()&&t!==null&&this.setInputValueFromOptions(t),this.selectMultiple()&&this.setInputValueFromOptions(this.selectedOptions());}clear(e){e?.stopPropagation(),this.#t=false,this.inputValue.set(""),this.selectedOptions.set([]),this.isOpen.set(false),this.prevInputValue.set(null),this.cleared.emit(),this.updateInputElValue();}updateInputElValue(){let e=this.inputRefEl(),t=this.inputValue();!e||e.value===t||(e.value=t,e.dispatchEvent(new Event("input")));}#e(e,t){return t.split(".").reduce((n,o)=>n?.[o],e)}#p(e){Object.defineProperty(e,"value",{configurable:true,get(){return Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),"value").get.call(this)},set(t){Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),"value").set.call(this,t);let o=new CustomEvent("inputValueChanged",{bubbles:true,cancelable:true,detail:{value:t}});return this.dispatchEvent(o),t}});}#d(e){let t=(e??"").toLowerCase(),n="^";for(let o of t)n+=".*"+this.#u(o);return n+=".*$",new RegExp(n,"i")}#u(e){return e.replace(/[-\/\\^$+?.()|[\]{}]/g,"\\$&")}ngOnDestroy(){this.openAbortController&&(this.openAbortController.abort(),this.openAbortController=null),typeof MutationObserver<"u"&&this.#s.disconnect();}static{this.\u0275fac=function(t){return new(t||i)};}static{this.\u0275cmp=dw({type:i,selectors:[["sh-select"]],contentQueries:function(t,n,o){t&1&&Bg(o,n.inlineTemplate,$r,5),t&2&&lC();},viewQuery:function(t,n){t&1&&$g(n.optionsWrapRef,Ve,5),t&2&&lC();},hostVars:4,hostBindings:function(t,n){t&2&&(bC(n.hostClasses()),Qg("multiple",n.selectMultiple()));},inputs:{value:[1,"value"],label:[1,"label"],asFreeText:[1,"asFreeText"],color:[1,"color"],variant:[1,"variant"],size:[1,"size"],optionTitle:[1,"optionTitle"],freeTextTitle:[1,"freeTextTitle"],freeTextPlaceholder:[1,"freeTextPlaceholder"],validateFreeText:[1,"validateFreeText"],placeholder:[1,"placeholder"],readonly:[1,"readonly"],disabled:[1,"disabled"],lazySearch:[1,"lazySearch"],inlineSearch:[1,"inlineSearch"],asText:[1,"asText"],isClearable:[1,"isClearable"],selectMultiple:[1,"selectMultiple"],optionTemplate:[1,"optionTemplate"],selectedOptionTemplate:[1,"selectedOptionTemplate"],placeholderTemplate:[1,"placeholderTemplate"],freeTextOptionTemplate:[1,"freeTextOptionTemplate"],isOpen:[1,"isOpen"],isLoading:[1,"isLoading"],options:[1,"options"],selectedOptions:[1,"selectedOptions"]},outputs:{readonly:"readonlyChange",disabled:"disabledChange",isOpen:"isOpenChange",isLoading:"isLoadingChange",options:"optionsChange",selectedOptions:"selectedOptionsChange",cleared:"cleared",onAddNewFreeTextOption:"onAddNewFreeTextOption"},ngContentSelectors:we,decls:33,vars:29,consts:[["formFieldWrapper",""],["optionsWrap",""],[3,"isOpenChange","closed","isOpen","disableOpenByClick","options"],["trigger","",3,"click","color","variant","size"],["ngProjectAs","input",5,["input"],1,"input"],[1,"selected-value"],["suffix",""],["suffix","",1,"primary"],["role","listbox",1,"ship-options",3,"id"],["title",""],["role","option",1,"option",3,"id","selected","focused"],[1,"small",3,"class"],[1,"small",3,"click"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[4,"ngTemplateOutlet"],["suffix","",3,"click"],["role","option",1,"option",3,"click","id"],[3,"class","checked"],[3,"checked"]],template:function(t,n){if(t&1){let o=gT();oC(Ie),cm(0)(1)(2)(3)(4)(5)(6),Qi(7,"sh-popover",2,0),sm("isOpenChange",function(c){return Sd(o),HC(n.isOpen,c)||(n.isOpen=c),xd(c)}),Fg("closed",function(){return n.close()}),Qi(9,"sh-form-field",3),Fg("click",function(){return n.open()}),iC(10,0,Me),iC(11,1,Fe),iC(12,2,Ee),Qi(13,"div",4)(14,"div",5),oT(15,De,1,1)(16,qe,2,0)(17,Xe,2,1),iC(18,3),iC(19,4),Hl()(),oT(20,Ge,2,0,"sh-icon",6)(21,Je,1,0,"sh-spinner",7)(22,Ye,2,0,"sh-icon",6)(23,Ze,2,0,"sh-icon",6)(24,et,2,0,"sh-icon",6)(25,tt,2,0,"sh-icon",6)(26,it,2,0,"sh-icon",6),Hl(),Qi(27,"div",8,1),oT(29,dt,3,3),oT(30,ut,2,1,"p",9),cT(31,xt,4,8,"li",10,sT),Hl()();}if(t&2){BC(n.placeholderTemplate());let o=n.optionTemplate();DE(),BC(n.freeTextOptionTemplate());let s=n.selectedOptionTemplate(),c=n.inlineTemplate();DE();let C=BC(n.selectedOptions()),_=n.inputState();DE(),BC(s||o||c),DE(),BC(o||c),DE(),BC(!n.asText()&&n.selectMultiple()),DE();let p=BC(n.isOpen()&&n.hasSearch());DE(),im("isOpen",n.isOpen),gg("disableOpenByClick",true)("options",QC(28,Le)),DE(2),Qg("stretch",n.stretch())("small",n.small())("readonly",n.readonly()||n.disabled()),gg("color",n.color())("variant",n.variant())("size",n.size()),DE(4),Qg("show-search-text",p),DE(),Qg("is-selected",_==="selected"),DE(),iT(n.asFreeText()&&n.inputValue().length>0&&!n.isOpen()?15:C.length>0?16:p?-1:17),DE(5),iT(_==="closed"?20:_==="loading"?21:_==="open-searching"?22:_==="searching"?23:_==="selected"&&n._isClearable()?24:_==="selected"&&!n._isClearable()?25:26),DE(7),gg("id","optionsWrapId-"+n.componentId),DE(2),iT(n.asFreeText()?29:-1),DE(),iT(n.optionTitle()&&n.filteredOptions().length>0?30:-1),DE(),lT(n.filteredOptions());}},dependencies:[ei,oe,Fe$1,N$1,U,m,D,c],styles:[`sh-select{--miw: 13.125rem;--select-option-mih: min-content;--select-options-mh: 11.25rem;display:flex}sh-select sh-form-field{display:flex;--ff-mw: var(--miw)}sh-select sh-popover{flex:1 0}sh-select sh-popover:has(.ship-options:empty) .popover{opacity:0}sh-select .selected-value{width:100%;display:flex;flex-wrap:wrap;align-items:center;gap:.25rem;color:var(--base-8)}sh-select .selected-value input{margin:0}sh-select .selected-value.is-selected{color:var(--base-12)}sh-select sh-form-field .input-wrap .input{position:relative;display:flex;flex-wrap:wrap;--ff-space: .4375rem .625rem}sh-select sh-form-field .input-wrap .input textarea,sh-select sh-form-field .input-wrap .input input{opacity:0;width:0;height:0;position:absolute}sh-select sh-form-field .input-wrap .input.show-search-text input{opacity:1;height:initial;min-width:min-content;field-sizing:content;font:var(--paragraph-30);position:relative}sh-select sh-form-field .input-wrap .input.show-search-text textarea{opacity:1;height:initial;margin:.25rem 0 0}sh-select sh-form-field.small .input-wrap .input{--ff-space: .3125rem .5rem}sh-select sh-form-field.small .input-wrap .input sh-chip{--chip-h: 1.25rem;font-size:80%}.ship-options{padding:.5rem 0;display:flex;flex-direction:column;max-height:var(--select-options-mh);overflow-y:auto;overflow-x:hidden}.ship-options p[title]{padding:.25rem 1rem}.ship-options sh-divider{margin:.5rem 0}.ship-options .option{display:flex;justify-content:flex-start;align-items:center;min-height:var(--select-option-mih);margin:0 .5rem;padding:.5rem;gap:.5rem;width:calc(100% - 1rem);border-radius:var(--shape-2);appearance:none;background-color:transparent;border:0;cursor:pointer;color:var(--base-12);-webkit-user-select:none;user-select:none}.ship-options .option[disabled]{opacity:.3;cursor:initial}.ship-options .option[disabled]:hover{background-color:transparent}.ship-options .option sh-icon{font-size:1rem}.ship-options .option span.placeholder{color:var(--base-7)}.ship-options .option.active,.ship-options .option:checked,.ship-options .option:hover{background-color:var(--base-2);color:var(--base-12)}.ship-options .option.focused{background-color:var(--primary-1);color:var(--base-12)}.ship-options .option.focused:hover{background-color:var(--primary-2)}
3
3
  `],encapsulation:2});}}return i})();export{Nt as N,m};
@@ -1 +1 @@
1
- import {v}from'./chunk-CeFh90sX.js';import {v as ve}from'./chunk-B-ryE8KW.js';import {x}from'./chunk-CDRHCSvU.js';import'./chunk-Do6_xsGi.js';import {T,e as ee,U as Ue,b5 as k,d as dw,v as v$1,f as N,Z as lr,a8 as To,_ as _t,Q as Qi,O as Og,j as mg,P as Pg,H as Hl,o as oT,D as DE,i as iT,k as gT,X as XT,aP as Ul,F as Fg,S as Sd,n as nC,x as xd,aQ as Wl,z as gg,au as Lg,av as eC}from'./main-TZVLLK67.js';function W(u,S){if(u&1){let n=gT();Qi(0,"sh-menu",16)(1,"button",17),XT(2,2),Hl(),Ul(3,18),Qi(4,"button",19),Fg("click",function(){Sd(n);let e=nC();return xd(e.updateLogLevel("Disabled"))}),Og(5,3),mg(6,"sh-icon"),Pg(),Hl(),Qi(7,"button",19),Fg("click",function(){Sd(n);let e=nC();return xd(e.updateLogLevel("Verbose"))}),Og(8,4),mg(9,"sh-icon"),Pg(),Hl(),Qi(10,"button",19),Fg("click",function(){Sd(n);let e=nC();return xd(e.updateLogLevel("ExplicitOnly"))}),Og(11,5),mg(12,"sh-icon"),Pg(),Hl(),Qi(13,"button",19),Fg("click",function(){Sd(n);let e=nC();return xd(e.updateLogLevel("Profiling"))}),Og(14,6),mg(15,"sh-icon"),Pg(),Hl(),Qi(16,"button",19),Fg("click",function(){Sd(n);let e=nC();return xd(e.updateLogLevel("Retry"))}),Og(17,7),mg(18,"sh-icon"),Pg(),Hl(),Qi(19,"button",19),Fg("click",function(){Sd(n);let e=nC();return xd(e.updateLogLevel("Information"))}),Og(20,8),mg(21,"sh-icon"),Pg(),Hl(),Qi(22,"button",19),Fg("click",function(){Sd(n);let e=nC();return xd(e.updateLogLevel("DryRun"))}),Og(23,9),mg(24,"sh-icon"),Pg(),Hl(),Qi(25,"button",19),Fg("click",function(){Sd(n);let e=nC();return xd(e.updateLogLevel("Warning"))}),Og(26,10),mg(27,"sh-icon"),Pg(),Hl(),Qi(28,"button",19),Fg("click",function(){Sd(n);let e=nC();return xd(e.updateLogLevel("Error"))}),Og(29,11),mg(30,"sh-icon"),Pg(),Hl(),Wl(),Hl();}if(u&2){let n=nC();gg("openIndicator",true),DE(2),Lg(n.logLevelByLabel()),eC(2);}}var O=class u{#n=T(ee);#e=T(v);logLevel=this.#e.logLevel;logLevelByLabel=this.#e.logLevelByLabel;currentUrl=Ue(this.#n.url);constructor(){this.#n.events.subscribe(S=>{S instanceof k&&this.currentUrl.set(S.urlAfterRedirects);});}updateLogLevel(S){this.#e.isPolling.set(true),this.#e.updateLogLevel(S);}static \u0275fac=function(n){return new(n||u)};static \u0275cmp=dw({type:u,selectors:[["app-logs"]],decls:10,vars:1,consts:()=>{let S;S=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:archive${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON: Stored `;let n;n=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SH_ICON:play${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_ICON: Live `;let o;o=$localize`Log level: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let e;e=$localize`${"\uFFFD#6\uFFFD"}:START_TAG_SH_ICON:bell-simple-slash${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SH_ICON: Disabled `;let E;E=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SH_ICON:megaphone-simple${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SH_ICON: Verbose `;let L;L=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:flow-arrow${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON: Explicit only `;let N;N=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:speedometer${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON: Profiling `;let I;I=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SH_ICON:arrow-arc-left${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SH_ICON: Retry `;let d;d=$localize`${"\uFFFD#21\uFFFD"}:START_TAG_SH_ICON:info${"\uFFFD/#21\uFFFD"}:CLOSE_TAG_SH_ICON: Information `;let h;h=$localize`${"\uFFFD#24\uFFFD"}:START_TAG_SH_ICON:person-simple-run${"\uFFFD/#24\uFFFD"}:CLOSE_TAG_SH_ICON: Dry run `;let G;G=$localize`${"\uFFFD#27\uFFFD"}:START_TAG_SH_ICON:warning${"\uFFFD/#27\uFFFD"}:CLOSE_TAG_SH_ICON: Warning `;let m;return m=$localize`${"\uFFFD#30\uFFFD"}:START_TAG_SH_ICON:warning-octagon${"\uFFFD/#30\uFFFD"}:CLOSE_TAG_SH_ICON: Error `,[S,n,o,e,E,L,N,I,d,h,G,m,[1,"filters"],[1,"type-b"],["type","button","routerLink","/about/logs/stored","routerLinkActive","active"],["type","button","routerLink","/about/logs/live","routerLinkActive","active"],[3,"openIndicator"],["shButton","","type","button"],["menu",""],["shButton","","type","button",1,"small",3,"click"]]},template:function(n,o){n&1&&(Qi(0,"div",12)(1,"sh-button-group",13)(2,"button",14),Og(3,0),mg(4,"sh-icon"),Pg(),Hl(),Qi(5,"button",15),Og(6,1),mg(7,"sh-icon"),Pg(),Hl()(),oT(8,W,31,2,"sh-menu",16),Hl(),mg(9,"router-outlet")),n&2&&(DE(8),iT(o.currentUrl().startsWith("/about/logs/live")?8:-1));},dependencies:[v$1,x,N,ve,lr,To,_t],styles:["[_nghost-%COMP%]{display:block}.filters[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;padding:0 2rem;margin-bottom:1.25rem}"]})};export{O as default};
1
+ import {v}from'./chunk-BcpsSgKo.js';import {v as ve}from'./chunk-BZqhgAZ-.js';import {x}from'./chunk-0sb5_LpD.js';import'./chunk-C9EdrQe6.js';import {T,e as ee,U as Ue,b6 as k,d as dw,v as v$1,f as N,Z as lr,a8 as To,_ as _t,Q as Qi,O as Og,j as mg,P as Pg,H as Hl,o as oT,D as DE,i as iT,k as gT,X as XT,aP as Ul,F as Fg,S as Sd,n as nC,x as xd,aQ as Wl,z as gg,au as Lg,av as eC}from'./main-PXGZLKMN.js';function W(u,S){if(u&1){let n=gT();Qi(0,"sh-menu",16)(1,"button",17),XT(2,2),Hl(),Ul(3,18),Qi(4,"button",19),Fg("click",function(){Sd(n);let e=nC();return xd(e.updateLogLevel("Disabled"))}),Og(5,3),mg(6,"sh-icon"),Pg(),Hl(),Qi(7,"button",19),Fg("click",function(){Sd(n);let e=nC();return xd(e.updateLogLevel("Verbose"))}),Og(8,4),mg(9,"sh-icon"),Pg(),Hl(),Qi(10,"button",19),Fg("click",function(){Sd(n);let e=nC();return xd(e.updateLogLevel("ExplicitOnly"))}),Og(11,5),mg(12,"sh-icon"),Pg(),Hl(),Qi(13,"button",19),Fg("click",function(){Sd(n);let e=nC();return xd(e.updateLogLevel("Profiling"))}),Og(14,6),mg(15,"sh-icon"),Pg(),Hl(),Qi(16,"button",19),Fg("click",function(){Sd(n);let e=nC();return xd(e.updateLogLevel("Retry"))}),Og(17,7),mg(18,"sh-icon"),Pg(),Hl(),Qi(19,"button",19),Fg("click",function(){Sd(n);let e=nC();return xd(e.updateLogLevel("Information"))}),Og(20,8),mg(21,"sh-icon"),Pg(),Hl(),Qi(22,"button",19),Fg("click",function(){Sd(n);let e=nC();return xd(e.updateLogLevel("DryRun"))}),Og(23,9),mg(24,"sh-icon"),Pg(),Hl(),Qi(25,"button",19),Fg("click",function(){Sd(n);let e=nC();return xd(e.updateLogLevel("Warning"))}),Og(26,10),mg(27,"sh-icon"),Pg(),Hl(),Qi(28,"button",19),Fg("click",function(){Sd(n);let e=nC();return xd(e.updateLogLevel("Error"))}),Og(29,11),mg(30,"sh-icon"),Pg(),Hl(),Wl(),Hl();}if(u&2){let n=nC();gg("openIndicator",true),DE(2),Lg(n.logLevelByLabel()),eC(2);}}var O=class u{#n=T(ee);#e=T(v);logLevel=this.#e.logLevel;logLevelByLabel=this.#e.logLevelByLabel;currentUrl=Ue(this.#n.url);constructor(){this.#n.events.subscribe(S=>{S instanceof k&&this.currentUrl.set(S.urlAfterRedirects);});}updateLogLevel(S){this.#e.isPolling.set(true),this.#e.updateLogLevel(S);}static \u0275fac=function(n){return new(n||u)};static \u0275cmp=dw({type:u,selectors:[["app-logs"]],decls:10,vars:1,consts:()=>{let S;S=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:archive${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON: Stored `;let n;n=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SH_ICON:play${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_ICON: Live `;let o;o=$localize`Log level: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let e;e=$localize`${"\uFFFD#6\uFFFD"}:START_TAG_SH_ICON:bell-simple-slash${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SH_ICON: Disabled `;let E;E=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SH_ICON:megaphone-simple${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SH_ICON: Verbose `;let L;L=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:flow-arrow${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON: Explicit only `;let N;N=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:speedometer${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON: Profiling `;let I;I=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SH_ICON:arrow-arc-left${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SH_ICON: Retry `;let d;d=$localize`${"\uFFFD#21\uFFFD"}:START_TAG_SH_ICON:info${"\uFFFD/#21\uFFFD"}:CLOSE_TAG_SH_ICON: Information `;let h;h=$localize`${"\uFFFD#24\uFFFD"}:START_TAG_SH_ICON:person-simple-run${"\uFFFD/#24\uFFFD"}:CLOSE_TAG_SH_ICON: Dry run `;let G;G=$localize`${"\uFFFD#27\uFFFD"}:START_TAG_SH_ICON:warning${"\uFFFD/#27\uFFFD"}:CLOSE_TAG_SH_ICON: Warning `;let m;return m=$localize`${"\uFFFD#30\uFFFD"}:START_TAG_SH_ICON:warning-octagon${"\uFFFD/#30\uFFFD"}:CLOSE_TAG_SH_ICON: Error `,[S,n,o,e,E,L,N,I,d,h,G,m,[1,"filters"],[1,"type-b"],["type","button","routerLink","/about/logs/stored","routerLinkActive","active"],["type","button","routerLink","/about/logs/live","routerLinkActive","active"],[3,"openIndicator"],["shButton","","type","button"],["menu",""],["shButton","","type","button",1,"small",3,"click"]]},template:function(n,o){n&1&&(Qi(0,"div",12)(1,"sh-button-group",13)(2,"button",14),Og(3,0),mg(4,"sh-icon"),Pg(),Hl(),Qi(5,"button",15),Og(6,1),mg(7,"sh-icon"),Pg(),Hl()(),oT(8,W,31,2,"sh-menu",16),Hl(),mg(9,"router-outlet")),n&2&&(DE(8),iT(o.currentUrl().startsWith("/about/logs/live")?8:-1));},dependencies:[v$1,x,N,ve,lr,To,_t],styles:["[_nghost-%COMP%]{display:block}.filters[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;padding:0 2rem;margin-bottom:1.25rem}"]})};export{O as default};
@@ -0,0 +1,2 @@
1
+ import {g as gt$1,b as Qe}from'./chunk-CUxq_s_t.js';import'./chunk-DaIpTiYw.js';import {OptionsListComponent as Oe$1}from'./chunk-Bf1diO1u.js';import {S as Se}from'./chunk-B6vxBiK4.js';import {I}from'./chunk-DV2SIgNN.js';import {J}from'./chunk-B2fqvpov.js';import'./chunk-D48AStVy.js';import {O}from'./chunk-D1wHRltX.js';import'./chunk-CQ8rm_d9.js';import {N as Nt$2}from'./chunk-CBdr-6_u.js';import'./chunk-BZqhgAZ-.js';import'./chunk-0sb5_LpD.js';import'./chunk-COgNe44h.js';import'./chunk-BAZ5npJw.js';import {T,ab as C,e as ee,aw as W,U as Ue,N as Nt$1,C as Bu,d as dw,f as N,v,Q as Qi,F as Fg,o as oT,aP as Ul,X as XT,aQ as Wl,s as sm,H as Hl,O as Og,j as mg,P as Pg,z as gg,D as DE,i as iT,w as im,bg as Q,m,aJ as ci,G as Ga,cj as Uu,aE as Fo,bI as fe$1,aH as m$1,au as Lg,av as eC,aD as zC,a6 as be,at as h,I as Qg,a$ as Vs,ck as iy,c3 as Bs,ay as $u,bJ as vy,cl as _y,aZ as ee$1,l as HC,p as DD,y as TD,k as gT,S as Sd,n as nC,x as xd,bf as ig,a3 as QC,q as PC,aM as tb,aB as rm,aN as ob,aa as Gl,aR as rb}from'./main-PXGZLKMN.js';import'./chunk-DJbAxHpK.js';import'./chunk-MvQwR7nW.js';import'./chunk-SycscfJp.js';import {d}from'./chunk-DQW8lSiz.js';import'./chunk-CMmgPgiU.js';import {F as Fe$1}from'./chunk-C9EdrQe6.js';import {j as jn,G as Gn,T as Tn,Z as Ze,R as Rn,P as Pn,g as gn,h as hn,B as Bn,J as Jt,y as yt$1,r as rn}from'./chunk-Drc5kcUX.js';import'./chunk-B-fklW6A.js';import {L}from'./chunk-D28lTX0k.js';function ut(i,t){i&1&&(Qi(0,"p"),XT(1,3),Hl());}function dt(i,t){i&1&&(Qi(0,"sh-form-field")(1,"label",11),XT(2,4),Hl(),mg(3,"input",12),DD(),Hl()),i&2&&(DE(3),TD());}var it=new jn,at=()=>it.group({passphrase:it.control("")}),Fe=class i{#e=T(C);#t=T(G);#i=T(ee);#n=T(W);encryptionForm=this.#t.encryptionForm;creatingTemporaryBackup=Ue(false);settings=Ue([]);hasEncryptedBackup=Nt$1(()=>{let t=this.#t.destinationTestSignal();return t==="testing"||typeof t=="string"?true:t?.containsEncryptedBackupFiles??true});showEncryptionField=Ue(false);next(){let t=this.#t.destinationTargetUrl();if(!t)throw new Error("No target URL");this.creatingTemporaryBackup.set(true);let e=this.encryptionForm.value?.passphrase??null,o=[];e?o.push({Name:"--passphrase",Value:e}):o.push({Name:"--no-encryption",Value:"true"}),this.settings().forEach(n=>{let r=n.Name?.trim();r&&r!=="--"&&(r.startsWith("--")||(r=`--${r}`),o.push({Name:r,Value:n.Value??""}));}),this.#e.postApiV1Backups({requestBody:{Backup:{TargetURL:t,Settings:o}},temporary:true}).pipe(Bu(()=>this.creatingTemporaryBackup.set(false))).subscribe({next:n=>{let r=n.ID;this.#i.navigate([`/restore-draft/${r}`]);},error:n=>{console.error(n);}});}back(){this.#t.isFileRestore()?this.#i.navigate(["destination"],{relativeTo:this.#n.parent}):this.#t.exit();}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=dw({type:i,selectors:[["app-restore-encryption"]],decls:14,vars:5,consts:()=>{let t;t=$localize`Advanced options`;let e;e=$localize`${"\uFFFD#10\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let o;o=$localize`${"\uFFFD#13\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let n;n=$localize`The backup does not contain encrypted files.`;let r;r=$localize`Enter backup passphrase if defined.`;let _;return _=$localize`Password`,[t,e,o,n,_,[3,"submit","formGroup"],["title",""],[3,"optionsChange","options","hasFreeTextSettings"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary"],["for","password"],["type","password","id","password","autocomplete","disabled","placeholder",r,"formControlName","passphrase"]]},template:function(e,o){e&1&&(Qi(0,"form",5),Fg("submit",function(){return o.next()}),oT(1,ut,2,0,"p"),oT(2,dt,4,0,"sh-form-field"),Qi(3,"sh-toggle-card"),Ul(4,6),XT(5,0),Wl(),Qi(6,"app-options-list",7),sm("optionsChange",function(r){return HC(o.settings,r)||(o.settings=r),r}),Hl()(),Qi(7,"div",8)(8,"button",9),Fg("click",function(){return o.back()}),Og(9,1),mg(10,"sh-icon"),Pg(),Hl(),Qi(11,"button",10),Og(12,2),mg(13,"sh-icon"),Pg(),Hl()()()),e&2&&(gg("formGroup",o.encryptionForm),DE(),iT(o.hasEncryptedBackup()?-1:1),DE(),iT(o.hasEncryptedBackup()||o.showEncryptionField()?2:-1),DE(4),im("options",o.settings),gg("hasFreeTextSettings",true));},dependencies:[Gn,Tn,Ze,Rn,Pn,gn,hn,Fe$1,N,v,I,Oe$1],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"]})};var lt=()=>({standalone:true});function pt(i,t){i&1&&mg(0,"sh-progress-bar",13);}function mt(i,t){if(i&1&&(PC(0),tb(1,"bytes")),i&2){let e=nC().$implicit;Gl(" (",rb(1,1,e.FileSizes),") ");}}function St(i,t){i&1&&(Qi(0,"span",20),XT(1,4),Hl());}function Et(i,t){if(i&1&&(Qi(0,"div",19),PC(1),tb(2,"date"),oT(3,mt,2,3),oT(4,St,2,0,"span",20),Hl()),i&2){let e=t.$implicit;DE(),rm(" ",e.Version,": ",ob(2,4,e.Time,"medium")," "),DE(2),iT(e.FileSizes?3:-1),DE(),iT(e.IsFullBackup===false?4:-1);}}function Tt(i,t){i&1&&mg(0,"sh-progress-bar",13);}function gt(i,t){i&1&&(Qi(0,"sh-icon",28),PC(1,"spinner"),Hl());}function Ft(i,t){i&1&&(Qi(0,"sh-icon"),PC(1,"magnifying-glass"),Hl());}function Ct(i,t){if(i&1){let e=gT();Qi(0,"button",31),Fg("click",function(){Sd(e);let n=nC(4);return xd(n.clearSearch())}),Qi(1,"sh-icon"),PC(2,"x-circle"),Hl(),Qi(3,"span"),XT(4,8),Hl()();}}function Ot(i,t){i&1&&(Qi(0,"span"),XT(1,9),Hl());}function Nt(i,t){if(i&1&&(Qi(0,"span"),XT(1,10),Hl()),i&2){let e=nC(5);DE(),Lg(e.searchResults().length),eC(1);}}function ft(i,t){if(i&1&&(Qi(0,"div",30),oT(1,Ot,2,0,"span")(2,Nt,2,1,"span"),Hl()),i&2){let e=nC(4);DE(),iT(e.searchResults().length===0?1:2);}}function ht(i,t){if(i&1){let e=gT();Qi(0,"div",24)(1,"sh-form-field")(2,"label",25),XT(3,6),Hl(),Qi(4,"input",26),sm("ngModelChange",function(n){Sd(e);let r=nC(3);return HC(r.searchQuery,n)||(r.searchQuery=n),xd(n)}),Fg("keydown.enter",function(n){Sd(e);let r=nC(3);return n.preventDefault(),xd(r.performSearch())}),Hl(),DD(),Hl(),Qi(5,"button",27),Fg("click",function(){Sd(e);let n=nC(3);return xd(n.performSearch())}),oT(6,gt,2,0,"sh-icon",28)(7,Ft,2,0,"sh-icon"),Qi(8,"span"),XT(9,7),Hl()(),oT(10,Ct,5,0,"button",29),Hl(),oT(11,ft,3,1,"div",30);}if(i&2){let e=nC(3);DE(4),im("ngModel",e.searchQuery),gg("ngModelOptions",QC(6,lt)),TD(),DE(),gg("disabled",e.isSearching()||!e.searchQuery().trim()),DE(),iT(e.isSearching()?6:7),DE(4),iT(e.isSearchMode()?10:-1),DE(),iT(e.isSearchMode()&&!e.isSearching()?11:-1);}}function Rt(i,t){if(i&1){let e=gT();oT(0,ht,12,7),Qi(1,"app-file-tree",21),Fg("hasExtendedData",function(n){Sd(e);let r=nC(2);return xd(r.extendedDataType.set(n))}),Qi(2,"label",22),XT(3,5),Hl(),mg(4,"input",23),DD(),Hl();}if(i&2){let e=nC(2);iT(e.canSearch()?0:-1),DE(),gg("rootPaths",e.rootPaths())("initialNodes",e.initialNodes())("backupSettings",e.backupSettings())("multiSelect",true)("showFiles",true)("loadExtendedData",true)("searchMode",e.isSearchMode())("searchResults",e.searchResults()),DE(3),TD();}}function Pt(i,t){if(i&1){let e=gT();Qi(0,"sh-select",17),Fg("cleared",function(){Sd(e);let n=nC();return xd(n.abortLoading())}),Qi(1,"input",18),sm("ngModelChange",function(n){Sd(e);let r=nC();return HC(r.selectOption,n)||(r.selectOption=n),xd(n)}),Hl(),DD(),ig(2,Et,5,7,"ng-template"),Hl(),oT(3,Tt,1,0,"sh-progress-bar",13),oT(4,Rt,5,9);}if(i&2){let e=nC();gg("options",e.versionOptions())("isClearable",false),DE(),im("ngModel",e.selectOption),gg("ngModelOptions",QC(6,lt)),TD(),DE(2),iT(e.isRepairing()||e.versionOptionsLoading()||e.loadingRootPath()?3:-1),DE(),iT(e.showFileTree()?4:-1);}}var Oe=new jn,_t=()=>Oe.group({filesToRestore:Oe.control(""),passphrase:Oe.control(null)}),Ne=class i{#e=T(C);#t=T(G);#i=T(Q);#n=T(m);#o=T(ee);#r=T(W);#a=T(ci);#l=null;#_=null;#s=Ue([]);selectFilesForm=this.#t.selectFilesForm;selectFilesFormSignal=this.#t.selectFilesFormSignal;selectOption=this.#t.selectOption;backupId=this.#t.backupId;versionOptionsLoading=this.#t.versionOptionsLoading;versionOptions=this.#t.versionOptions;isFileRestore=this.#t.isFileRestore;extendedDataType=this.#t.extendedDataType;needsDatabaseRepair=Nt$1(()=>this.#t.backup()?.Backup?.IsTemporary??true);showFileTree=Ue(false);backupSettings=Ue(null);rootPaths=Ue([]);initialNodes=Ue([]);loadingRootPath=Ue(false);isRepairing=Nt$1(()=>this.#s().length>0);loadedVersions=Ue({});canSearch=Nt$1(()=>this.#n.hasV2ListOperations());searchQuery=Ue("");isSearching=Ue(false);searchResults=Ue([]);hasSearched=Ue(false);isSearchMode=Nt$1(()=>this.searchQuery().length>0&&this.hasSearched());loadingEffect=Ga(()=>{if(this.versionOptionsLoading())return;let e=this.versionOptions();if(e&&e?.length>0){let o=e[0].Version;this.selectOption.set(o.toString());}});backupSettingsEffect=Ga(()=>{let t=this.backupId(),e=this.selectOption(),o=this.isRepairing(),n=this.loadedVersions();if(!e||!t)return;let _=this.versionOptions()?.find(k=>k.Version===parseInt(e))?.Time??null;if(!_)return;let u=`${t}+${_}`,I=n[u];if(this.needsDatabaseRepair()&&(!I||o))return;let D={id:t+"",time:_};this.backupSettings.set(D),this.getRootPath(D);});repairEffect=Ga(()=>{if(!this.needsDatabaseRepair())return;let t=this.selectOption(),e=this.versionOptions();if(t){let o=e.find(_=>_.Version===parseInt(t));if(o===void 0)return;let n=this.backupId(),r=`${n}+${o.Time}`;if(this.#_===r||(this.#_=r,this.#s().includes(r)))return;this.#s.update(_=>[..._,r]),this.#e.postApiV1BackupByIdRepairupdate({id:n,requestBody:{only_paths:true,time:o.Time}}).pipe(Uu(this.abortLoading$),Bu(()=>{this.#_=null;})).subscribe(_=>{let u=_.ID;this.#i.waitForTaskToComplete(u).pipe(Fo(1)).subscribe(()=>{this.#s.update(I=>I.filter(D=>D!==r)),this.loadedVersions.update(I=>(I[r]=true,I));});});}});getRootPath(t){let e={id:t.id+"",time:t.time,prefixOnly:true,folderContents:false},o=t.id+"";this.isRepairing()||this.#l===o||(this.#l=o,this.loadingRootPath.set(true),this.showFileTree.set(false),this.#n.hasV2ListOperations()?this.#e.postApiV2BackupListFolder({requestBody:{BackupId:t.id,Time:t.time,Paths:null,PageSize:0,Page:0,ReturnExtended:true}}).pipe(Uu(this.abortLoading$),Bu(()=>{this.showFileTree.set(true),this.loadingRootPath.set(false),this.#l=null;})).subscribe({next:n=>{let r=(n.Data??[]).find(u=>u.Metadata&&u.Metadata.ExtType&&u.Metadata.ExtType.length>0);r&&this.extendedDataType.set(r.Metadata.ExtType);let _=(n.Data??[]).map(u=>u.Path??"");_.length>0?(this.initialNodes.set([]),this.rootPaths.set(_)):(this.initialNodes.set([]),this.rootPaths.set(["/"]));}}):this.#e.getApiV1BackupByIdFiles(e).pipe(Uu(this.abortLoading$),Bu(()=>{this.showFileTree.set(true),this.loadingRootPath.set(false);})).subscribe({next:n=>{let r=n.Files.map(_=>_.Path??"");r.length>0?(this.initialNodes.set([]),this.rootPaths.set(r)):(this.initialNodes.set([]),this.rootPaths.set(["/"]));}}));}abortLoading$=new fe$1;abortLoading(){this.showFileTree.set(false),this.loadingRootPath.set(false),this.abortLoading$.next(true);}displayFn(){let t=this.versionOptions();return e=>{if(!e)return "";let o=t?.find(n=>typeof n.Version=="number"&&n.Version.toString()===e);return o?`${o.Version}: ${this.#a.transform(o.Time,"medium")}`:""}}next(){this.#o.navigate(["options"],{relativeTo:this.#r.parent});}back(){this.#t.isFileRestore()?this.#o.navigate(["encryption"],{relativeTo:this.#r.parent}):this.#t.exit();}performSearch(){let t=this.searchQuery().trim(),e=this.backupSettings(),o=(this.#t.extendedDataType()??"").length>0;if(!t||!e)return;let r=this.versionOptions()?.find(_=>_.Version===parseInt(this.selectOption()??""))?.Version;r!=null&&(this.isSearching.set(true),this.searchResults.set([]),this.hasSearched.set(true),this.#e.postApiV2BackupSearch({requestBody:{BackupId:e.id,Time:null,Version:[r],Filters:[t],Paths:null,PageSize:1e3,Page:0,ReturnExtended:o,SearchMetadata:o}}).pipe(Uu(this.abortLoading$),Bu(()=>this.isSearching.set(false))).subscribe({next:_=>{this.searchResults.set(_.Data??[]);},error:()=>{this.searchResults.set([]);}}));}clearSearch(){this.searchQuery.set(""),this.searchResults.set([]),this.hasSearched.set(false);}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=dw({type:i,selectors:[["app-select-files"]],features:[zC([ci])],decls:13,vars:3,consts:()=>{let t;t=$localize`Select files`;let e;e=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let o;o=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let n;n=$localize`Select an option...`;let r;r=$localize`(partial)`;let _;_=$localize`Path`;let u;u=$localize`Enter search term...`;let I;I=$localize`Search files`;let D;D=$localize`Search`;let k;k=$localize`Clear`;let oe;oe=$localize`0 results found`;let ne;return ne=$localize`Found ${"\uFFFD0\uFFFD"}:INTERPOLATION: result(s)`,[["formRef",""],t,e,o,r,_,I,D,k,oe,ne,[3,"submit","formGroup"],[1,"title-30"],[1,"indeterminate","primary"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary"],["value","Version",3,"cleared","options","isClearable"],["type","text","placeholder",n,3,"ngModelChange","ngModel","ngModelOptions"],[1,"custom-option"],[1,"partial"],[3,"hasExtendedData","rootPaths","initialNodes","backupSettings","multiSelect","showFiles","loadExtendedData","searchMode","searchResults"],["for","path"],["type","text","id","path","formControlName","filesToRestore"],[1,"search-container"],["for","search"],["type","text","id","search","placeholder",u,3,"ngModelChange","keydown.enter","ngModel","ngModelOptions"],["shButton","","type","button",1,"small",3,"click","disabled"],[1,"spinner"],["shButton","","type","button",1,"small","secondary"],[1,"search-results-info"],["shButton","","type","button",1,"small","secondary",3,"click"]]},template:function(e,o){e&1&&(Qi(0,"form",11,0),Fg("submit",function(){return o.next()}),Qi(2,"h3",12),XT(3,1),Hl(),oT(4,pt,1,0,"sh-progress-bar",13)(5,Pt,5,7),Qi(6,"div",14)(7,"button",15),Fg("click",function(){return o.back()}),Og(8,2),mg(9,"sh-icon"),Pg(),Hl(),Qi(10,"button",16),Og(11,3),mg(12,"sh-icon"),Pg(),Hl()()()),e&2&&(gg("formGroup",o.selectFilesForm),DE(4),iT(o.versionOptionsLoading()?4:5),DE(5),Lg(o.isFileRestore()?"Back":"Exit"),eC(8));},dependencies:[Bn,Tn,Ze,Rn,Pn,Jt,Gn,gn,hn,Se,v,Fe$1,N,Nt$2,d,ci,m$1],styles:["[_nghost-%COMP%]{display:block;margin-top:2.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.partial[_ngcontent-%COMP%]{color:var(--base-9);font-style:italic}.search-container[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.search-container[_ngcontent-%COMP%] sh-form-field[_ngcontent-%COMP%]{flex:1}.search-results-info[_ngcontent-%COMP%]{color:var(--base-8);font-size:var(--small)}"]})};var G=class i{#e=T(ee);#t=T(W);#i=T(m);#n=T(be);#o=T(C);backupId=Ue(null);backup=Ue(null);destinationTargetUrl=Ue(null);destinationTestSignal=Ue(null);selectFilesForm=_t();optionsForm=ct();encryptionForm=at();optionsFormSignal=L(this.optionsForm.valueChanges);selectFilesFormSignal=L(this.selectFilesForm.valueChanges);selectOption=Ue(null);versionOptionsLoading=Ue(false);versionOptions=Ue([]);isSubmitting=Ue(false);isFileRestore=Ue(false);isFullWidthPage=Ue(false);extendedDataType=Ue(null);alternateRestorePath=Ue(null);alternateRestorePathSourcePrefix=Ue(null);init(t,e=false){this.backupId.set(t),this.isFileRestore.set(e),this.alternateRestorePath.set(null),this.extendedDataType.set(null),e&&this.#e.navigate(["/restore-from-files/destination"]),e||this.getBackup();}updateTargetUrl(t){this.destinationTargetUrl.set(t);}setAlternateRestorePath(t,e){this.alternateRestorePath.set(t),this.alternateRestorePathSourcePrefix.set(e);}submit(){this.isSubmitting.set(true);let t=this.backupId();this.backup()?.Backup?.IsTemporary??false?this.#o.postApiV1BackupByIdCopytotemp({id:this.backupId()??""}).subscribe({next:o=>{this.#r(o.ID??"");},error:o=>this.showErrorDialog($localize`An error occurred while copying the backup to a temporary location: ${o.message}`)}):this.#r(t??"");}showErrorDialog(t){this.#n.open(h,{data:{title:$localize`Error occured`,message:t,confirmText:$localize`OK`,cancelText:void 0},closed:e=>{}});}#r(t){let e=this.optionsForm.value,o=this.selectFilesForm.value,n=this.selectOption(),r=this.versionOptions()?.find(_=>_.Version===(n&&parseInt(n)));this.#o.postApiV1BackupByIdRestore({id:t??"",requestBody:{paths:o.filesToRestore?.split("\0").map(_=>_.endsWith("/")||_.endsWith("\\")?`${_}*`:_)??[],passphrase:o.passphrase??null,time:r?.Time,restore_path:this.alternateRestorePath()??e.restoreFromPath,overwrite:e.handleExisting==="overwrite",permissions:e.permissions,skip_metadata:!e.includeMetadata,source_prefix:this.alternateRestorePathSourcePrefix(),connection_string_id:null}}).pipe(Bu(()=>this.isSubmitting.set(false))).subscribe({next:_=>{this.#e.navigate([`./${_.ID}`,"progress"],{relativeTo:this.#t});},error:_=>{console.error("restore error",_);}});}exit(){this.#n.open(h,{data:{title:$localize`Confirm exit?`,message:$localize`Are you sure you want to exit?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:t=>{t&&(this.#a(),this.#e.navigate(["/"]));}});}getVersionOptions(){this.versionOptions();}loadFilesetsWithRetryv2(t,e=2){return this.#o.postApiV2BackupListFilesets({requestBody:{BackupId:t}}).pipe(Vs(o=>{let n=o?.error?.body?.StatusCode??o?.error?.requestBody?.StatusCode;return n==="EncryptedStorageNoPassphrase"||n==="FolderMissing"||n==="EmptyRemoteFolder"||e===0?iy(()=>o):Bs(1e3).pipe($u(()=>this.loadFilesetsWithRetryv2(t,e-1)))}))}getBackup(){let t=this.backupId();this.versionOptionsLoading.set(true),this.#i.hasV2ListOperations()?vy([this.#o.getApiV1BackupById({id:t}),this.loadFilesetsWithRetryv2(t)]).pipe(Fo(1),Bu(()=>this.versionOptionsLoading.set(false))).subscribe({next:([e,o])=>{if(o.Error)throw new Error(o.Error);if(!(e.Backup?.IsTemporary??true)&&e?.Backup?.DBPathExists===false){this.#n.open(h,{data:{title:$localize`Missing Local Database`,message:$localize`The local database for this backup is missing. Please repair or recreate the local database before restoring.`,confirmText:$localize`OK`,cancelText:void 0},closed:r=>{this.#e.navigate(["/backup",t,"database"]);}});return}this.versionOptions.set((o.Data??[]).map(r=>({Version:r.Version??-1,IsFullBackup:r.IsFullBackup??void 0,Time:r.Time??"<missing>",FileCount:r.FileCount??void 0,FileSizes:r.FileSizes??void 0}))),this.backup.set(e);},error:e=>{let o=e?.error?.body?.StatusCode??e?.error?.requestBody?.StatusCode,n=o==="EncryptedStorageNoPassphrase",r=o==="FolderMissing",_=o==="EmptyRemoteFolder",u=$localize`An error occurred while loading the backup filesets: ${e.message}`;n&&(u=$localize`The remote storage is encrypted. Please enter the passphrase to access the backup.`),r&&(u=$localize`The backup storage folder was not found.`),_&&(u=$localize`The backup storage folder does not contain any filesets.`),this.#n.open(h,{data:{title:$localize`Failed to load backup filesets`,message:u,confirmText:$localize`OK`,cancelText:void 0},closed:I=>{this.#e.navigate([n?"/restore-from-files/encryption":"/restore-from-files/destination"]);}});}}):vy([this.#o.getApiV1BackupById({id:t}),this.#o.getApiV1BackupByIdFilesets({id:t}).pipe(_y(3))]).pipe(Fo(1),Bu(()=>this.versionOptionsLoading.set(false))).subscribe({next:([e,o])=>{this.versionOptions.set(o.map(n=>({Version:n.Version??-1,IsFullBackup:(n.IsFullBackup??1)==1,Time:n.Time??"<missing>",FileCount:n.FileCount??void 0,FileSizes:n.FileSizes??void 0}))),this.backup.set(e);}});}#a(){this.selectFilesForm.reset(),this.optionsForm.reset();}static \u0275fac=function(e){return new(e||i)};static \u0275prov=ee$1({token:i,factory:i.\u0275fac,providedIn:"root"})};function It(i,t){if(i&1){let e=gT();Qi(0,"sh-radio",27),Og(1,6),mg(2,"input",31),DD(),Pg(),Hl(),Qi(3,"sh-radio",27),Og(4,7),Qi(5,"input",32),Fg("click",function(){Sd(e);let n=nC(2);return xd(n.chooseCustomRemoteDestination())}),Hl(),DD(),Pg(),Hl();}i&2&&(DE(2),TD(),DE(3),TD());}function Mt(i,t){if(i&1){let e=gT();Qi(0,"sh-radio",27),Og(1,8),mg(2,"input",31),DD(),Pg(),Hl(),Qi(3,"sh-radio",27),Og(4,9),Qi(5,"input",32),Fg("click",function(){Sd(e);let n=nC(2);return xd(n.chooseCustomRemoteDestination())}),Hl(),DD(),Pg(),Hl();}i&2&&(DE(2),TD(),DE(3),TD());}function Lt(i,t){if(i&1&&(Qi(0,"app-file-tree",29)(1,"label",33),PC(2,"Path"),Hl(),mg(3,"input",34),DD(),Hl()),i&2){let e=nC(2);gg("disabled",e.optionsFormSignal()?.restoreFrom!=="pickLocation")("enableCreateFolder",true)("resolvePaths",true),DE(3),TD();}}function yt(i,t){if(i&1&&(Qi(0,"app-file-tree",30)(1,"label",33),PC(2,"Path"),Hl(),mg(3,"input",34),DD(),Hl()),i&2){let e=nC(2);gg("customRemoteMode",e.extendedDataType())("backupId",e.backupId())("sourcePrefix",e.remoteCustomSourcePrefix())("destinationUrl",e.customDestinationUrl()),DE(3),TD();}}function Dt(i,t){if(i&1&&(oT(0,It,6,0)(1,Mt,6,0),Qi(2,"sh-radio",27),Og(3,5),mg(4,"input",28),DD(),Pg(),Hl(),oT(5,Lt,4,3,"app-file-tree",29),oT(6,yt,4,4,"app-file-tree",30)),i&2){let e=nC();iT(e.extendedDataType()==="o365"?0:e.extendedDataType()==="gsuite"?1:-1),DE(4),TD(),DE(),iT(e.optionsFormSignal()?.restoreFrom==="pickLocation"?5:-1),DE(),iT(e.showCustomRemoteRestoreTree()?6:-1);}}function bt(i,t){if(i&1&&(Qi(0,"sh-radio",27),Og(1,10),mg(2,"input",35),DD(),Pg(),Hl(),Qi(3,"sh-radio",27),Og(4,11),mg(5,"input",28),DD(),Pg(),Hl(),Qi(6,"app-file-tree",29)(7,"label",33),PC(8,"Path"),Hl(),mg(9,"input",34),DD(),Hl()),i&2){let e=nC();DE(2),TD(),DE(3),TD(),DE(),gg("disabled",e.optionsFormSignal()?.restoreFrom!=="pickLocation")("enableCreateFolder",true)("resolvePaths",true),DE(3),TD();}}function $t(i,t){i&1&&(Qi(0,"app-toggle-card",22),Ul(1,23),XT(2,12),Wl(),Qi(3,"sh-toggle",27),Og(4,13),mg(5,"input",36),DD(),Pg(),Hl()()),i&2&&(gg("disableToggle",true),DE(5),TD());}function vt(i,t){i&1&&(Qi(0,"app-toggle-card",22),Ul(1,23),XT(2,14),Wl(),Qi(3,"sh-radio",27),Og(4,15),mg(5,"input",37),DD(),Pg(),Hl(),Qi(6,"sh-radio",27),Og(7,16),mg(8,"input",38),DD(),Pg(),Hl()(),Qi(9,"app-toggle-card"),Ul(10,23),XT(11,17),Wl(),Qi(12,"sh-toggle",39),Og(13,18),mg(14,"input",40),DD(),Pg(),Hl(),Qi(15,"sh-toggle",39),Og(16,19),mg(17,"input",41),DD(),Pg(),Hl()()),i&2&&(gg("disableToggle",true),DE(5),TD(),DE(3),TD(),DE(6),TD(),DE(3),TD());}var B=new jn,ct=()=>B.group({restoreFrom:B.control("original"),restoreFromPath:B.control(""),handleExisting:B.control("saveTimestamp"),permissions:B.control(false),includeMetadata:B.control(true),customRemoteIgnoreExisting:B.control(false)}),fe=class i{#e=T(G);#t=T(ee);#i=T(W);#n=T(m);#o=T(be);optionsForm=this.#e.optionsForm;optionsFormSignal=this.#e.optionsFormSignal;isSubmitting=this.#e.isSubmitting;extendedData=this.#e.extendedDataType;remoteCustomTargetUrl=Ue(null);backupId=Nt$1(()=>this.#e.backup()?.Backup?.ID??null);extendedDataType=Nt$1(()=>{let t=this.#e.extendedDataType();return t==="o365"?"o365":t==="gsuite"?"gsuite":null});remoteCustomSourceEntry=Nt$1(()=>this.#e.backup()?.Backup?.Sources?.filter(t=>t.startsWith("@")&&(t.includes("|office365://")||t.includes("|googleworkspace://")))[0]??null);remoteCustomSourceUrl=Nt$1(()=>this.remoteCustomSourceEntry()?.split("|")[1]??null);remoteCustomSourcePrefix=Nt$1(()=>this.remoteCustomSourceEntry()?.split("|")[0]??null);customDestinationUrl=Nt$1(()=>{let t=this.optionsFormSignal()?.restoreFrom,e=this.extendedDataType()!==null;return t==="same-custom"&&e?this.remoteCustomSourceUrl():t==="other-custom"&&e?this.remoteCustomTargetUrl():null});showCustomRemoteRestoreTree=Nt$1(()=>!!(this.optionsFormSignal()?.restoreFrom==="same-custom"&&this.customDestinationUrl()&&this.backupId()||this.optionsFormSignal()?.restoreFrom==="other-custom"&&this.customDestinationUrl()));isCustomRemoteRestore=Nt$1(()=>{let t=this.optionsFormSignal()?.restoreFrom;return t==="same-custom"||t==="other-custom"});chooseCustomRemoteDestination(){let t=this.extendedDataType()==="o365"?"office365://":"googleworkspace://";return this.#o.open(gt$1,{maxWidth:"700px",maxHeight:"80vh",width:"100%",closeOnOutsideClick:false,data:{targetUrlModel:this.remoteCustomTargetUrl()||this.remoteCustomSourceUrl()||t,moduleType:"RestoreDestinationProvider",askToCreate:true,expectedResult:"any",suppressErrorDialogs:true,backupId:this.backupId(),sourcePrefix:this.remoteCustomSourcePrefix()}}).closed.subscribe(o=>{o&&(this.remoteCustomTargetUrl.set(o),this.optionsForm.controls.restoreFrom.setValue("other-custom"));}),false}#r=Ga(()=>{let t=this.optionsFormSignal()?.restoreFrom;this.extendedDataType()!=null&&(t==="original"||t===void 0)&&(this.optionsForm.controls.restoreFrom.setValue("pickLocation"),this.optionsForm.controls.handleExisting.setValue("overwrite")),this.extendedDataType()==null&&(t==="same-custom"||t==="other-custom")&&(this.optionsForm.controls.restoreFrom.setValue("original"),this.optionsForm.controls.handleExisting.setValue("saveTimestamp"));});goBack(){this.#t.navigate(["select-files"],{relativeTo:this.#i.parent});}submit(){let t=this.#e.selectFilesFormSignal()?.filesToRestore??[];if(t.length>0&&this.optionsFormSignal()?.restoreFrom=="original"&&(t[0].includes("/")?"/":"\\")!==this.#n.systemInfo()?.DirectorySeparator){this.#o.open(h,{data:{title:$localize`Confirm target folder`,message:$localize`This backup was created on another operating system. Restoring files without specifying a destination folder can cause files to be restored in unexpected places. Are you sure you want to continue without choosing a destination folder?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:n=>{n&&this.#e.submit();}});return}if(this.optionsFormSignal()?.restoreFrom==="same-custom"||this.optionsFormSignal()?.restoreFrom==="other-custom"){let o=this.optionsFormSignal()?.restoreFromPath;if(o&&o.startsWith("/")&&(o=o.substring(1)),!o||o.trim()===""){this.#o.open(h,{data:{title:$localize`No path specified`,message:this.extendedDataType()==="gsuite"?$localize`Please choose a path to restore to in the Google Workspace account.`:$localize`Please choose a path to restore to in the Microsoft 365 tenant.`,confirmText:$localize`OK`,cancelText:void 0}});return}let n=this.optionsFormSignal()?.customRemoteIgnoreExisting,r=this.customDestinationUrl()?.substring(this.customDestinationUrl().indexOf("?")),_=this.extendedDataType()==="gsuite"?`@googleworkspace://${encodeURIComponent(o)}${r}&google-ignore-existing=${n?"true":"false"}`:`@office365://${encodeURIComponent(o)}${r}&office365-ignore-existing=${n?"true":"false"}`;this.#e.setAlternateRestorePath(_,this.remoteCustomSourcePrefix()),this.optionsForm.controls.includeMetadata.setValue(true),this.optionsForm.controls.permissions.setValue(true);}else this.#e.setAlternateRestorePath(null,null);this.#e.submit();}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=dw({type:i,selectors:[["app-advanced-options-settings"]],decls:18,vars:6,consts:()=>{let t;t=$localize`Restore options`;let e;e=$localize`Where do you want to restore files to?`;let o;o=$localize`${"\uFFFD#14\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let n;n=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SH_ICON: Submit `;let r;r=$localize` Local file system ${"\uFFFD#4\uFFFD\uFFFD/#4\uFFFD"}:TAG_INPUT:`;let _;_=$localize` Same Microsoft 365 Tenant ${"\uFFFD#2\uFFFD\uFFFD/#2\uFFFD"}:TAG_INPUT:`;let u;u=$localize` Different Microsoft 365 Tenant ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let I;I=$localize` Same Google Workspace Account ${"\uFFFD#2\uFFFD\uFFFD/#2\uFFFD"}:TAG_INPUT:`;let D;D=$localize` Different Google Workspace Account ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let k;k=$localize` Original location ${"\uFFFD#2\uFFFD\uFFFD/#2\uFFFD"}:TAG_INPUT:`;let oe;oe=$localize` Pick location ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let ne;ne=$localize`Restore settings`;let P;P=$localize` Ignore existing resources in the destination ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let he;he=$localize`How do you want to handle existing files?`;let Re;Re=$localize` Overwrite ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let Pe;Pe=$localize` Save different versions with timestamp in file name ${"\uFFFD#8\uFFFD\uFFFD/#8\uFFFD"}:TAG_INPUT:`;let Ie;Ie=$localize`Metadata settings`;let Me;Me=$localize` Restore file metadata ${"\uFFFD#14\uFFFD\uFFFD/#14\uFFFD"}:TAG_INPUT:`;let Le;return Le=$localize` Restore read/write permissions ${"\uFFFD#17\uFFFD\uFFFD/#17\uFFFD"}:TAG_INPUT:`,[["formRef",""],t,e,o,n,r,_,u,I,D,k,oe,ne,P,he,Re,Pe,Ie,Me,Le,[3,"submit","formGroup"],[1,"title-30"],[3,"disableToggle"],["title",""],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary"],[1,"raised","primary"],["type","radio","name","restoreFrom","value","pickLocation","formControlName","restoreFrom"],[3,"disabled","enableCreateFolder","resolvePaths"],[3,"customRemoteMode","backupId","sourcePrefix","destinationUrl"],["type","radio","name","restoreFrom","value","same-custom","formControlName","restoreFrom"],["type","radio","name","restoreFrom","value","other-custom","formControlName","restoreFrom",3,"click"],["for","path"],["type","text","id","path","formControlName","restoreFromPath"],["type","radio","name","restoreFrom","value","original","formControlName","restoreFrom"],["type","checkbox","formControlName","customRemoteIgnoreExisting"],["type","radio","name","handleExisting","value","overwrite","formControlName","handleExisting"],["type","radio","name","handleExisting","value","saveTimestamp","formControlName","handleExisting"],[1,"primary","raised"],["type","checkbox","formControlName","includeMetadata"],["type","checkbox","formControlName","permissions"]]},template:function(e,o){e&1&&(Qi(0,"form",20,0),Fg("submit",function(){return o.submit()}),Qi(2,"h3",21),XT(3,1),Hl(),Qi(4,"app-toggle-card",22),Ul(5,23),XT(6,2),Wl(),oT(7,Dt,7,3)(8,bt,10,3),Hl(),oT(9,$t,6,1,"app-toggle-card",22)(10,vt,18,1),Qi(11,"div",24)(12,"button",25),Fg("click",function(){return o.goBack()}),Og(13,3),mg(14,"sh-icon"),Pg(),Hl(),Qi(15,"button",26),Og(16,4),mg(17,"sh-icon"),Pg(),Hl()()()),e&2&&(gg("formGroup",o.optionsForm),DE(4),gg("disableToggle",true),DE(3),iT(o.extendedDataType()!==null?7:8),DE(2),iT(o.isCustomRemoteRestore()?9:10),DE(6),Qg("loading",o.isSubmitting()));},dependencies:[Gn,Tn,Ze,yt$1,rn,Rn,Pn,gn,hn,Qe,Se,J,O,v,N],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"]})};
2
+ var chunkV4TWRE66=/*#__PURE__*/Object.freeze({__proto__:null,createEncryptionForm:at,default:Fe});var chunkXSEY6SAS=/*#__PURE__*/Object.freeze({__proto__:null,createRestoreSelectFilesForm:_t,default:Ne});var chunkV45AL3LW=/*#__PURE__*/Object.freeze({__proto__:null,createRestoreOptionsForm:ct,default:fe});export{G,chunkXSEY6SAS as a,chunkV45AL3LW as b,chunkV4TWRE66 as c};
@@ -0,0 +1,2 @@
1
+ import {T,ae as Jr,bu as N,B as y1,bU as B$1,af as m1,bV as re,b as g1,b8 as ce,d as dw,f as N$1,L as oC,Q as Qi,q as PC,H as Hl,Y as iC,o as oT,h as bC,D as DE,i as iT,F as Fg,aC as hg,$ as $g,K as lC,k as gT,S as Sd,n as nC,x as xd,z as gg}from'./main-PXGZLKMN.js';var B=["internalInput"],K=["*"];function Q(i,T){if(i&1){let t=gT();Qi(0,"input",6,0),Fg("change",function(n){Sd(t);let u=nC();return xd(u.onInternalInputChange(n))}),Hl();}if(i&2){let t=nC();gg("checked",t.checked()),hg("disabled",t.disabled()?"":null);}}var U=(()=>{class i{constructor(){this.#e=T(Jr),this.#n=T(N),this.internalInput=y1("internalInput"),this.projectedInputs=B$1("input:not(.internal-input)",{childList:true,attributes:true}),this.checked=m1(false),this.currentClassList=re(),this.color=g1(null),this.variant=g1(null),this.readonly=g1(false),this.disabled=g1(false),this.noInternalInput=g1(false),this.hostClasses=ce("checkbox",{color:this.color,variant:this.variant,readonly:this.readonly});}#e;#n;onInternalInputChange(t){if(this.disabled())return;let e=t.target;this.checked.set(e.checked);}onKeyDown(t){if(this.#n.matches(t,"checkbox.toggle")){let e=this.internalInput()?.nativeElement;e&&getComputedStyle(e).display!=="none"?e.click():this.#e.nativeElement.click(),t.preventDefault();}}static{this.\u0275fac=function(e){return new(e||i)};}static{this.\u0275cmp=dw({type:i,selectors:[["sh-checkbox"]],viewQuery:function(e,n){e&1&&$g(n.internalInput,B,5),e&2&&lC();},hostVars:6,hostBindings:function(e,n){e&1&&Fg("keydown",function(L){return n.onKeyDown(L)}),e&2&&(hg("disabled",n.disabled()?"":null)("role",n.noInternalInput()?"checkbox":null)("aria-checked",n.noInternalInput()?n.checked():null)("tabindex",n.noInternalInput()?n.disabled()?"-1":"0":null),bC(n.hostClasses()));},inputs:{checked:[1,"checked"],color:[1,"color"],variant:[1,"variant"],readonly:[1,"readonly"],disabled:[1,"disabled"],noInternalInput:[1,"noInternalInput"]},outputs:{checked:"checkedChange"},ngContentSelectors:K,decls:8,vars:3,consts:[["internalInput",""],[1,"box","sh-sheet"],[1,"inherit","default-indicator"],[1,"inherit","indeterminate-indicator"],[1,"label"],["type","checkbox",1,"internal-input",3,"checked"],["type","checkbox",1,"internal-input",3,"change","checked"]],template:function(e,n){e&1&&(oC(),Qi(0,"div",1)(1,"sh-icon",2),PC(2,"check-bold"),Hl(),Qi(3,"sh-icon",3),PC(4,"minus-bold"),Hl()(),Qi(5,"div",4),iC(6),Hl(),oT(7,Q,2,2,"input",5)),e&2&&(bC(n.currentClassList()),DE(7),iT(n.projectedInputs().length===0&&!n.noInternalInput()?7:-1));},dependencies:[N$1],styles:[`sh-checkbox .sh-sheet{--box-bw: .0625rem;--box-bc: var(--sheet-bc);--sheet-s: var(--shape-1)}sh-checkbox{display:flex;align-items:center;gap:.5rem;cursor:pointer;-webkit-user-select:none;user-select:none;position:relative;border:0}sh-checkbox:focus-visible>.box,sh-checkbox:has(input:focus-visible)>.box{outline:2px solid var(--primary-8);outline-offset:2px}sh-checkbox>input.internal-input,sh-checkbox .label>input{appearance:none;position:absolute;inset:0;cursor:pointer;z-index:0;margin:0}sh-checkbox>input.internal-input:focus,sh-checkbox>input.internal-input:focus-visible,sh-checkbox .label>input:focus,sh-checkbox .label>input:focus-visible{outline:none}sh-checkbox:has(.label>input)>input.internal-input{display:none}sh-checkbox .label:empty{display:none}sh-checkbox:has(input[disabled]),sh-checkbox[disabled]:not([disabled=false]){opacity:.5;pointer-events:none;-webkit-user-select:none;user-select:none;cursor:initial}sh-checkbox .box{display:flex;align-items:center;justify-content:center;width:1.25rem;height:1.25rem;cursor:pointer;position:relative;border:var(--box-bw) solid var(--box-bc)}sh-checkbox .box sh-icon{opacity:0;font-weight:700;transition:opacity 75ms linear}sh-checkbox .box sh-icon.indeterminate-indicator{display:none}sh-checkbox.raised:not(:has(input:checked)):not(.active) .box,sh-checkbox.flat:not(:has(input:checked)):not(.active) .box{background:transparent;border:var(--border-10);border-color:var(--box-bc)}sh-checkbox.indeterminate .box sh-icon.indeterminate-indicator{display:block}sh-checkbox.indeterminate .box sh-icon.default-indicator{display:none}sh-checkbox:has(input:checked) .box sh-icon,sh-checkbox.indeterminate .box sh-icon,sh-checkbox.active .box sh-icon{opacity:1}sh-checkbox:hover .box sh-icon{opacity:.5}
2
+ `],encapsulation:2});}}return i})();export{U};
@@ -1,2 +1,2 @@
1
- import {d as dw,L as oC,Y as iC}from'./main-TZVLLK67.js';var d=["*"],c=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)};}static{this.\u0275cmp=dw({type:e,selectors:[["sh-divider"]],hostAttrs:["role","separator"],ngContentSelectors:d,decls:1,vars:0,template:function(i,a){i&1&&(oC(),iC(0));},styles:[`sh-divider{--divider-c: var(--base-4);--divider-h: .0625rem;display:flex;gap:.5rem;align-items:center;text-align:center}sh-divider:empty{gap:0}sh-divider:before,sh-divider:after{content:"";background:var(--divider-c);height:var(--divider-h);flex:1 0}
1
+ import {d as dw,L as oC,Y as iC}from'./main-PXGZLKMN.js';var d=["*"],c=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)};}static{this.\u0275cmp=dw({type:e,selectors:[["sh-divider"]],hostAttrs:["role","separator"],ngContentSelectors:d,decls:1,vars:0,template:function(i,a){i&1&&(oC(),iC(0));},styles:[`sh-divider{--divider-c: var(--base-4);--divider-h: .0625rem;display:flex;gap:.5rem;align-items:center;text-align:center}sh-divider:empty{gap:0}sh-divider:before,sh-divider:after{content:"";background:var(--divider-c);height:var(--divider-h);flex:1 0}
2
2
  `],encapsulation:2});}}return e})();export{c};