@simai-studio/ui 5.20261021.2249 → 5.20261022.1233

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 (32) hide show
  1. package/README.md +4 -4
  2. package/distr/component/dropdown/js/dropdown.min.js +1 -1
  3. package/distr/core/js/core-loader.js +133 -7
  4. package/distr/core/js/core-loader.min.js +1 -1
  5. package/distr/core/js/smart-base.js +134 -12
  6. package/distr/core/js/smart-base.min.js +1 -1
  7. package/distr/smart/buttons/js/buttons.min.js +1 -1
  8. package/distr/smart/buttons/smart.manifest.json +1 -1
  9. package/distr/smart/country-code/js/country-code.min.js +9 -7
  10. package/distr/smart/country-code/smart.manifest.json +6 -1
  11. package/distr/smart/country-code/template/default.js +12 -4
  12. package/distr/smart/datepicker/js/datepicker.min.js +12 -9
  13. package/distr/smart/datepicker/smart.manifest.json +13 -3
  14. package/distr/smart/datepicker/template/default.js +4 -1
  15. package/distr/smart/dropdown/js/dropdown.min.js +10 -10
  16. package/distr/smart/dropdown/smart.manifest.json +1 -1
  17. package/distr/smart/dropdown/template/default.js +10 -3
  18. package/distr/smart/field-renderers/js/field-renderers.min.js +17 -17
  19. package/distr/smart/icon-buttons/js/icon-buttons.min.js +1 -1
  20. package/distr/smart/icon-buttons/smart.manifest.json +1 -1
  21. package/distr/smart/icons/js/icons.min.js +1 -1
  22. package/distr/smart/icons/smart.manifest.json +1 -1
  23. package/distr/smart/inputs/js/inputs.min.js +33 -31
  24. package/distr/smart/inputs/smart.manifest.json +6 -1
  25. package/distr/smart/inputs/template/default.js +8 -0
  26. package/distr/smart/popover/js/popover.min.js +1 -1
  27. package/distr/smart/popover/smart.manifest.json +1 -1
  28. package/distr/smart/switch/js/switch.min.js +12 -11
  29. package/distr/smart/switch/smart.manifest.json +6 -1
  30. package/distr/smart/switch/template/default.js +2 -1
  31. package/package-manifest.json +32 -32
  32. package/package.json +4 -4
@@ -1,4 +1,4 @@
1
- (()=>{"use strict";var t={"50d2a204ba4c"(t,e,n){n.d(e,{le:()=>r});function i(t,e={}){const n=document.createElementNS("http://www.w3.org/2000/svg",t);return Object.entries(e).forEach(([t,e])=>{null!=e&&""!==e&&n.setAttribute(t,String(e))}),n}const o=t=>Math.round(1e3*t)/1e3;function s(t={}){return function({width:t=24,height:e=24,stroke:n=2,dots:s=8,filled:r=3,dotRadius:a=null,direction:l="clockwise",pixel:c=!1}={}){const u=t/2,d=e/2,h=Math.min(t,e)/2,f=Math.max(1,h-n/2),g=i("svg",{class:"sf-loader-svg",viewBox:`0 0 ${t} ${e}`,width:c?t:null,height:c?e:null,"aria-hidden":"true",focusable:"false"}),p={cx:u,cy:d,r:o(f),fill:"none",stroke:"currentColor","stroke-width":n},b=i("circle",{class:"sf-loader-ring-filled",...p,opacity:"0.3"}),m=i("circle",{class:"sf-loader-ring-accent",...p,"stroke-linecap":"round",pathLength:100,"stroke-dasharray":"30 70",transform:`rotate(90 ${u} ${d})`}),y=i("g",{class:"sf-loader-comet",display:"none",transform:`rotate(-90 ${u} ${d})`});for(let t=0;t<10;t+=1){const e=9===t;y.append(i("circle",{class:"sf-loader-comet-segment"+(e?" sf-loader-comet-head":""),...p,"stroke-linecap":e?"round":"butt",pathLength:100,"stroke-dasharray":`${o(4)} ${o(96)}`,"stroke-dashoffset":o(-4*t),opacity:o(((t+1)/10)**1.6)}))}const S=Math.max(3,Math.min(32,Math.floor(Number(s)||8))),v=Math.max(1,Math.min(S,Math.floor(Number(r)||3))),x=Math.min(n,.7*Math.PI*(h-n)/S),A=null==a||""===a?x:Math.max(1,Math.min(Number(a)||x,h/4)),w=Math.max(A,h-A),$=i("g",{class:"sf-loader-dots",display:"none",style:`--sf-loader-dot-count:${S}; --sf-loader-dot-filled:${v};`});for(let t=0;t<S;t+=1){const e=2*Math.PI/S*t-Math.PI/2,n="counterclockwise"===l?t:(S-t)%S;$.append(i("circle",{class:"sf-loader-dot"+(t<v?" sf-loader-dot--active":""),cx:o(u+w*Math.cos(e)),cy:o(d+w*Math.sin(e)),r:o(A),fill:"currentColor",style:`--sf-loader-dot-index:${t}; --sf-loader-dot-step:${n};`}))}return g.append(b,m,y,$),g}({...t,width:24,height:24,stroke:2,dotRadius:null,pixel:!1})}function r({className:t="",overlay:e=!1}={}){const n=document.createElement("span");n.className=["sf-loader-container","sf-loader--infinite",t,t&&e?`${t}--overlay`:""].filter(Boolean).join(" "),n.dataset.sfSpinnerBound="1",n.dataset.infinite="true",n.setAttribute("aria-hidden","true");const i=document.createElement("span");return i.className="sf-loader--loading-indicator",i.append(s()),n.append(i),n}},"06e8cd089f28"(t,e,n){function i(){const t=globalThis.SF=globalThis.SF||{};return t.__deprecationNotes instanceof Map||Object.defineProperty(t,"__deprecationNotes",{value:new Map,configurable:!0}),t.__deprecationNotes}function o({component:t="",kind:e="attribute",attribute:n="",from:o,to:s=null}={}){if(!o)return;const r=[t,e,n,o].join("|"),a=i(),l=a.get(r);if(l)l.count+=1;else if(a.set(r,{component:t,kind:e,attribute:n,from:o,to:s,count:1}),function(){const t=globalThis.document?.documentElement;return"warn"===t?.dataset?.sfDeprecations||!0===globalThis.SF?.deprecations?.warn}()){const i=t?`${t}: `:"",r="value"===e?`${n}="${o}"`:`${e} ${o}`;globalThis.console?.warn?.(`[SIMAI Framework] ${i}${r} is a legacy name${s?`; write ${s}`:""}. See contracts/changes/journal.json.`)}}if(n.d(e,{YB:()=>o}),"undefined"!=typeof globalThis){globalThis.SF=globalThis.SF||{};const t=globalThis.SF.deprecations||{};t.list=function(){return[...i().values()].map(t=>({...t}))},t.clear=function(){i().clear()},t.note=o,globalThis.SF.deprecations=t}},c76f8895b630(t,e,n){n.a(t,async(t,e)=>{try{var i=n("fbe0570fcc69"),o=n("5168bdf4a1f9"),s=n("ddf1cdb42ecc"),r=n("2feae72af89f"),a=n("06e8cd089f28"),l=t([i,o,s,r]);[i,o,s,r]=l.then?(await l)():l;var c=n.n(i);const u=new Set(["template","size","appearance","type","scheme","status","text","icon","icon-start","icon-end","icon-left","icon-right","icon-position","text-position","spacing","tightness","radius","root-class","loading","segment","disabled","native-type","aria-label","class","style","id","slot"]);function d(t,e){t?.forwardHostAttributes(e,{exclude:u,transferDataAttributes:!0,storageKey:"__sfButtonForwardedDataAttributes",targetStorageKey:"__sfButtonAttributeKeys"})}const h=["default","tonal","outline","link","surface"],f={ghost:"link"},g={danger:"error",critical:"error"};class p extends(c()){constructor(){super(),this._attributeObserver=null,this._textFromChildren=""}static get props(){return{templateName:{attribute:"template",default:"default"},size:{default:"1"},appearance:{default:"default",aliases:["type"]},scheme:{default:"primary"},status:{default:"",values:["","error"]},textPosition:{type:String,default:"center"},text:{default:""},segment:{default:""},icon:{default:""},iconStart:{type:String,default:null},iconEnd:{type:String,default:null},iconLeft:{default:""},iconRight:{default:""},iconPosition:{default:"start"},spacing:{type:String,default:null},tightness:{default:"",values:["","low","high","highest"]},radius:{default:"",values:["","default","square","rounded"]},rootClass:{default:""},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},nativeType:{default:"button"},ariaLabel:{default:""}}}get templateName(){return this.getAttribute("template")||"default"}get size(){return this.getAttribute("size")||"1"}get appearance(){const t=this.getAttribute("appearance")||this.getAttribute("type")||"default";return Object.hasOwn(f,t)?((0,a.YB)({component:this.localName,kind:"value",attribute:"appearance",from:t,to:f[t]}),f[t]):h.includes(t)?t:"default"}get type(){return this.appearance}get scheme(){return this.getAttribute("scheme")||"primary"}get status(){const t=this.getAttribute("status")||"";return g[t]?((0,a.YB)({component:this.localName,kind:"value",attribute:"status",from:t,to:g[t]}),g[t]):t}get text(){return this.getAttribute("text")||this._textFromChildren||""}captureTextChildren(){if(this.hasSlotContent?.("text"))return;const t=Array.from(this.childNodes).filter(t=>3===t.nodeType&&""!==String(t.textContent).trim());t.length&&(this._textFromChildren=t.map(t=>String(t.textContent).trim()).join(" "),t.forEach(t=>t.remove()))}onConnected(){this.captureTextChildren(),super.onConnected?.()}get icon(){return this.getAttribute("icon")||""}get iconLeft(){return this.hasAttribute("icon-left")&&(0,a.YB)({component:this.localName,kind:"attribute",from:"icon-left",to:"icon-start"}),this.getAttribute("icon-start")??this.getAttribute("icon-left")}get iconRight(){return this.hasAttribute("icon-right")&&(0,a.YB)({component:this.localName,kind:"attribute",from:"icon-right",to:"icon-end"}),this.getAttribute("icon-end")??this.getAttribute("icon-right")}get iconStart(){return this.iconLeft}get iconEnd(){return this.iconRight}get iconPosition(){return this.getAttribute("icon-position")||"start"}noteLegacyNames(){return this.hasAttribute("tightness")&&(0,a.YB)({component:this.localName,kind:"attribute",from:"tightness",to:"spacing"}),{}}get tightness(){return(0,r.resolveControlSpacing)({spacing:this.getAttribute("spacing"),tightness:this.getAttribute("tightness")}).tightness}get spacing(){return(0,r.resolveControlSpacing)({spacing:this.getAttribute("spacing"),tightness:this.getAttribute("tightness")}).spacing}get radius(){return this.getEnumAttr("radius",["default","square","rounded"],"")}get rootClass(){return this.getAttribute("root-class")||""}get loading(){return this.getBooleanAttr("loading",!1)}get disabled(){return this.getBooleanAttr("disabled",!1)}get nativeType(){return this.getAttribute("native-type")||"button"}get ariaLabel(){return this.getAttribute("aria-label")||""}templateContext(){this.captureTextChildren?.();const t=this.getPropsContext();return this.createTemplateContext({...t,text:this.text,iconLeft:t.iconStart??t.iconLeft,iconRight:t.iconEnd??t.iconRight,iconStart:this.iconStart,iconEnd:this.iconEnd,type:this.type,appearance:"ghost"===t.appearance?"link":t.appearance,status:this.status,...(0,r.resolveControlSpacing)({spacing:this.getAttribute("spacing"),tightness:this.getAttribute("tightness")}),...this.noteLegacyNames?.(),component:this})}template(){return(0,o.B)(this.templateContext())}resolveUpdateMode(){return"lit"}afterRender(){d(this,this.querySelector(".sf-button")),this._attributeObserver||(this._attributeObserver=this.observeForwardedHostAttributes(()=>this.querySelector(".sf-button"),{exclude:u,transferDataAttributes:!0,storageKey:"__sfButtonForwardedDataAttributes",targetStorageKey:"__sfButtonAttributeKeys"})._forwardHostAttributeObserver)}get value(){return{template:this.templateName,size:this.size,appearance:this.appearance,type:this.type,scheme:this.scheme,status:this.status,text:this.text,icon:this.icon,iconLeft:this.iconLeft,iconRight:this.iconRight,iconStart:this.iconStart,iconEnd:this.iconEnd,iconPosition:this.iconPosition,tightness:this.tightness,spacing:this.spacing,radius:this.radius,rootClass:this.rootClass,loading:this.loading,disabled:this.disabled,nativeType:this.nativeType,ariaLabel:this.ariaLabel}}onClick(t,e){return"function"==typeof t&&this.addEventListener("click",t,e),this}onFocus(t,e){return"function"==typeof t&&this.addEventListener("focusin",t,e),this}onBlur(t,e){return"function"==typeof t&&this.addEventListener("focusout",t,e),this}onMouseEnter(t,e){return"function"==typeof t&&this.addEventListener("mouseenter",t,e),this}onMouseLeave(t,e){return"function"==typeof t&&this.addEventListener("mouseleave",t,e),this}setDisabled(t=!0){return t?this.setAttribute("disabled",""):this.removeAttribute("disabled"),this}createIcon(t){return t?s.html`<sf-icon icon="${t}" root-class="pointer-event-none" weight="400" aria-hidden="true"></sf-icon>`:""}set value(t){this.setValueAttributes(t)}onDisconnected(){this.disconnectForwardedHostAttributes(),this._attributeObserver=null,super.onDisconnected?.()}}p.define("sf-button"),e()}catch(b){e(b)}})},"5168bdf4a1f9"(t,e,n){n.a(t,async(t,i)=>{try{n.d(e,{B:()=>l});var o=n("ddf1cdb42ecc"),s=n("50d2a204ba4c"),r=t([o]),a=r.then?(await r)():r;o=a[0];function l(t){const{size:e,appearance:n,type:i,scheme:r,status:a,text:l,icon:c,iconLeft:u,iconRight:d,iconPosition:h,spacing:f,radius:g,rootClass:p,textPosition:b,loading:m,disabled:y,nativeType:S,ariaLabel:v,segment:x}=t,A=String(h||"start").toLowerCase(),w=["right","end"].includes(A),$=t.iconStart??(u||(c&&!w?c:"")),_=t.iconEnd??(d||(c&&w?c:"")),C=t.component,T=C?.hasSlotContent?.("icon-start")?C.getSlotContent("icon-start"):C?.hasSlotContent?.("icon-left")?C.getSlotContent("icon-left"):C.createIcon($),M=C?.hasSlotContent?.("icon-end")?C.getSlotContent("icon-end"):C?.hasSlotContent?.("icon-right")?C.getSlotContent("icon-right"):C.createIcon(_),k=C?.hasSlotContent?.("text")?C.getSlotContent("text"):l,F=!T&&!M;let E=T,L=M,N="";if(m){const t=t=>(0,s.le)({className:"sf-button-spinner",overlay:t});T?E=t(!1):M?L=t(!1):N=t(!0)}const B=["sf-button",`sf-button--size-${e}`,`sf-button--${n||i}`,`sf-button--${a||r}`,"flex","items-cross-center",x?`segment-${x}`:"",f&&"normal"!==f?`spacing-${f}`:"",g?`radius-${g}`:"",p,m?"loading sf-button-state-loading":""].filter(Boolean);return o.html`
1
+ (()=>{"use strict";var t={"50d2a204ba4c"(t,e,n){n.d(e,{le:()=>r});function i(t,e={}){const n=document.createElementNS("http://www.w3.org/2000/svg",t);return Object.entries(e).forEach(([t,e])=>{null!=e&&""!==e&&n.setAttribute(t,String(e))}),n}const o=t=>Math.round(1e3*t)/1e3;function s(t={}){return function({width:t=24,height:e=24,stroke:n=2,dots:s=8,filled:r=3,dotRadius:a=null,direction:l="clockwise",pixel:c=!1}={}){const u=t/2,d=e/2,h=Math.min(t,e)/2,f=Math.max(1,h-n/2),g=i("svg",{class:"sf-loader-svg",viewBox:`0 0 ${t} ${e}`,width:c?t:null,height:c?e:null,"aria-hidden":"true",focusable:"false"}),p={cx:u,cy:d,r:o(f),fill:"none",stroke:"currentColor","stroke-width":n},b=i("circle",{class:"sf-loader-ring-filled",...p,opacity:"0.3"}),m=i("circle",{class:"sf-loader-ring-accent",...p,"stroke-linecap":"round",pathLength:100,"stroke-dasharray":"30 70",transform:`rotate(90 ${u} ${d})`}),y=i("g",{class:"sf-loader-comet",display:"none",transform:`rotate(-90 ${u} ${d})`});for(let t=0;t<10;t+=1){const e=9===t;y.append(i("circle",{class:"sf-loader-comet-segment"+(e?" sf-loader-comet-head":""),...p,"stroke-linecap":e?"round":"butt",pathLength:100,"stroke-dasharray":`${o(4)} ${o(96)}`,"stroke-dashoffset":o(-4*t),opacity:o(((t+1)/10)**1.6)}))}const S=Math.max(3,Math.min(32,Math.floor(Number(s)||8))),v=Math.max(1,Math.min(S,Math.floor(Number(r)||3))),x=Math.min(n,.7*Math.PI*(h-n)/S),A=null==a||""===a?x:Math.max(1,Math.min(Number(a)||x,h/4)),w=Math.max(A,h-A),$=i("g",{class:"sf-loader-dots",display:"none",style:`--sf-loader-dot-count:${S}; --sf-loader-dot-filled:${v};`});for(let t=0;t<S;t+=1){const e=2*Math.PI/S*t-Math.PI/2,n="counterclockwise"===l?t:(S-t)%S;$.append(i("circle",{class:"sf-loader-dot"+(t<v?" sf-loader-dot--active":""),cx:o(u+w*Math.cos(e)),cy:o(d+w*Math.sin(e)),r:o(A),fill:"currentColor",style:`--sf-loader-dot-index:${t}; --sf-loader-dot-step:${n};`}))}return g.append(b,m,y,$),g}({...t,width:24,height:24,stroke:2,dotRadius:null,pixel:!1})}function r({className:t="",overlay:e=!1}={}){const n=document.createElement("span");n.className=["sf-loader-container","sf-loader--infinite",t,t&&e?`${t}--overlay`:""].filter(Boolean).join(" "),n.dataset.sfSpinnerBound="1",n.dataset.infinite="true",n.setAttribute("aria-hidden","true");const i=document.createElement("span");return i.className="sf-loader--loading-indicator",i.append(s()),n.append(i),n}},"06e8cd089f28"(t,e,n){function i(){const t=globalThis.SF=globalThis.SF||{};return t.__deprecationNotes instanceof Map||Object.defineProperty(t,"__deprecationNotes",{value:new Map,configurable:!0}),t.__deprecationNotes}function o({component:t="",kind:e="attribute",attribute:n="",from:o,to:s=null}={}){if(!o)return;const r=[t,e,n,o].join("|"),a=i(),l=a.get(r);if(l)l.count+=1;else if(a.set(r,{component:t,kind:e,attribute:n,from:o,to:s,count:1}),function(){const t=globalThis.document?.documentElement;return"warn"===t?.dataset?.sfDeprecations||!0===globalThis.SF?.deprecations?.warn}()){const i=t?`${t}: `:"",r="value"===e?`${n}="${o}"`:`${e} ${o}`;globalThis.console?.warn?.(`[SIMAI Framework] ${i}${r} is a legacy name${s?`; write ${s}`:""}. See contracts/changes/journal.json.`)}}if(n.d(e,{YB:()=>o}),"undefined"!=typeof globalThis){globalThis.SF=globalThis.SF||{};const t=globalThis.SF.deprecations||{};t.list=function(){return[...i().values()].map(t=>({...t}))},t.clear=function(){i().clear()},t.note=o,globalThis.SF.deprecations=t}},c76f8895b630(t,e,n){n.a(t,async(t,e)=>{try{var i=n("fbe0570fcc69"),o=n("5168bdf4a1f9"),s=n("ddf1cdb42ecc"),r=n("2feae72af89f"),a=n("06e8cd089f28"),l=t([i,o,s,r]);[i,o,s,r]=l.then?(await l)():l;var c=n.n(i);const u=new Set(["template","size","appearance","type","scheme","status","text","icon","icon-start","icon-end","icon-left","icon-right","icon-position","text-position","spacing","tightness","radius","root-class","loading","segment","disabled","native-type","aria-label","class","style","id","slot"]);function d(t,e){t?.forwardHostAttributes(e,{exclude:u,transferDataAttributes:!0,storageKey:"__sfButtonForwardedDataAttributes",targetStorageKey:"__sfButtonAttributeKeys"})}const h=["default","tonal","outline","link","surface"],f={ghost:"link"},g={danger:"error",critical:"error"};class p extends(c()){constructor(){super(),this._attributeObserver=null,this._textFromChildren=""}static get props(){return{templateName:{attribute:"template",default:"default"},size:{default:"1"},appearance:{default:"default",aliases:["type"]},scheme:{default:"primary"},status:{default:"",values:["","error"]},textPosition:{type:String,default:"center"},text:{default:""},segment:{default:""},icon:{default:""},iconStart:{type:String,default:null},iconEnd:{type:String,default:null},iconLeft:{default:""},iconRight:{default:""},iconPosition:{default:"start"},spacing:{type:String,default:null},tightness:{default:"",values:["","low","high","highest"]},radius:{default:"",values:["","default","square","rounded"]},rootClass:{default:""},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},nativeType:{default:"button"},ariaLabel:{default:""}}}get templateName(){return this.getAttribute("template")||"default"}get size(){return this.getAttribute("size")||"1"}get appearance(){const t=this.getAttribute("appearance")||this.getAttribute("type")||"default";return Object.hasOwn(f,t)?((0,a.YB)({component:this.localName,kind:"value",attribute:"appearance",from:t,to:f[t]}),f[t]):h.includes(t)?t:"default"}get type(){return this.appearance}get scheme(){return this.getAttribute("scheme")||"primary"}get status(){const t=this.getAttribute("status")||"";return g[t]?((0,a.YB)({component:this.localName,kind:"value",attribute:"status",from:t,to:g[t]}),g[t]):t}get text(){return this.getAttribute("text")||this._textFromChildren||""}captureTextChildren(){if(this.hasSlotContent?.("text"))return;const t=Array.from(this.childNodes).filter(t=>3===t.nodeType&&""!==String(t.textContent).trim());t.length&&(this._textFromChildren=t.map(t=>String(t.textContent).trim()).join(" "),t.forEach(t=>t.remove()))}onConnected(){this.captureTextChildren(),super.onConnected?.()}get icon(){return this.getAttribute("icon")||""}get iconLeft(){return this.hasAttribute("icon-left")&&(0,a.YB)({component:this.localName,kind:"attribute",from:"icon-left",to:"icon-start"}),this.getAttribute("icon-start")??this.getAttribute("icon-left")}get iconRight(){return this.hasAttribute("icon-right")&&(0,a.YB)({component:this.localName,kind:"attribute",from:"icon-right",to:"icon-end"}),this.getAttribute("icon-end")??this.getAttribute("icon-right")}get iconStart(){return this.iconLeft}get iconEnd(){return this.iconRight}get iconPosition(){return this.getAttribute("icon-position")||"start"}noteLegacyNames(){return this.hasAttribute("tightness")&&(0,a.YB)({component:this.localName,kind:"attribute",from:"tightness",to:"spacing"}),{}}get tightness(){return(0,r.resolveControlSpacing)({spacing:this.getAttribute("spacing"),tightness:this.getAttribute("tightness")}).tightness}get spacing(){return(0,r.resolveControlSpacing)({spacing:this.getAttribute("spacing"),tightness:this.getAttribute("tightness")}).spacing}get radius(){return this.getEnumAttr("radius",["default","square","rounded"],"")}get rootClass(){return this.getAttribute("root-class")||""}get loading(){return this.getBooleanAttr("loading",!1)}get disabled(){return this.getBooleanAttr("disabled",!1)}get nativeType(){return this.getAttribute("native-type")||"button"}get ariaLabel(){return this.getAttribute("aria-label")||""}templateContext(){this.captureTextChildren?.();const t=this.getPropsContext();return this.createTemplateContext({...t,text:this.text,iconLeft:t.iconStart??t.iconLeft,iconRight:t.iconEnd??t.iconRight,iconStart:this.iconStart,iconEnd:this.iconEnd,type:this.type,appearance:"ghost"===t.appearance?"link":t.appearance,status:this.status,...(0,r.resolveControlSpacing)({spacing:this.getAttribute("spacing"),tightness:this.getAttribute("tightness")}),...this.noteLegacyNames?.(),component:this})}template(){return(0,o.B)(this.templateContext())}resolveUpdateMode(){return"lit"}afterRender(){d(this,this.querySelector(".sf-button")),this._attributeObserver||(this._attributeObserver=this.observeForwardedHostAttributes(()=>this.querySelector(".sf-button"),{exclude:u,transferDataAttributes:!0,storageKey:"__sfButtonForwardedDataAttributes",targetStorageKey:"__sfButtonAttributeKeys"})._forwardHostAttributeObserver)}focusDelegate(){return this.querySelector(".sf-button")}get value(){return{template:this.templateName,size:this.size,appearance:this.appearance,type:this.type,scheme:this.scheme,status:this.status,text:this.text,icon:this.icon,iconLeft:this.iconLeft,iconRight:this.iconRight,iconStart:this.iconStart,iconEnd:this.iconEnd,iconPosition:this.iconPosition,tightness:this.tightness,spacing:this.spacing,radius:this.radius,rootClass:this.rootClass,loading:this.loading,disabled:this.disabled,nativeType:this.nativeType,ariaLabel:this.ariaLabel}}onClick(t,e){return"function"==typeof t&&this.addEventListener("click",t,e),this}onFocus(t,e){return"function"==typeof t&&this.addEventListener("focusin",t,e),this}onBlur(t,e){return"function"==typeof t&&this.addEventListener("focusout",t,e),this}onMouseEnter(t,e){return"function"==typeof t&&this.addEventListener("mouseenter",t,e),this}onMouseLeave(t,e){return"function"==typeof t&&this.addEventListener("mouseleave",t,e),this}setDisabled(t=!0){return t?this.setAttribute("disabled",""):this.removeAttribute("disabled"),this}createIcon(t){return t?s.html`<sf-icon icon="${t}" root-class="pointer-event-none" weight="400" aria-hidden="true"></sf-icon>`:""}set value(t){this.setValueAttributes(t)}onDisconnected(){this.disconnectForwardedHostAttributes(),this._attributeObserver=null,super.onDisconnected?.()}}p.define("sf-button"),e()}catch(b){e(b)}})},"5168bdf4a1f9"(t,e,n){n.a(t,async(t,i)=>{try{n.d(e,{B:()=>l});var o=n("ddf1cdb42ecc"),s=n("50d2a204ba4c"),r=t([o]),a=r.then?(await r)():r;o=a[0];function l(t){const{size:e,appearance:n,type:i,scheme:r,status:a,text:l,icon:c,iconLeft:u,iconRight:d,iconPosition:h,spacing:f,radius:g,rootClass:p,textPosition:b,loading:m,disabled:y,nativeType:S,ariaLabel:v,segment:x}=t,A=String(h||"start").toLowerCase(),w=["right","end"].includes(A),$=t.iconStart??(u||(c&&!w?c:"")),_=t.iconEnd??(d||(c&&w?c:"")),C=t.component,T=C?.hasSlotContent?.("icon-start")?C.getSlotContent("icon-start"):C?.hasSlotContent?.("icon-left")?C.getSlotContent("icon-left"):C.createIcon($),M=C?.hasSlotContent?.("icon-end")?C.getSlotContent("icon-end"):C?.hasSlotContent?.("icon-right")?C.getSlotContent("icon-right"):C.createIcon(_),k=C?.hasSlotContent?.("text")?C.getSlotContent("text"):l,F=!T&&!M;let E=T,L=M,N="";if(m){const t=t=>(0,s.le)({className:"sf-button-spinner",overlay:t});T?E=t(!1):M?L=t(!1):N=t(!0)}const B=["sf-button",`sf-button--size-${e}`,`sf-button--${n||i}`,`sf-button--${a||r}`,"flex","items-cross-center",x?`segment-${x}`:"",f&&"normal"!==f?`spacing-${f}`:"",g?`radius-${g}`:"",p,m?"loading sf-button-state-loading":""].filter(Boolean);return o.html`
2
2
  <button
3
3
  type=${S}
4
4
  class=${B.join(" ")}
@@ -509,7 +509,7 @@
509
509
  "source_artifacts": [
510
510
  {
511
511
  "path": "src/smart/buttons/index.js",
512
- "sha256": "1bf0b0b1c5516332437565ff5a61e8539b2d037786b74ce43e1fd3003fcfde58"
512
+ "sha256": "830807ad0a44684df8554802c39ee7d50bbb18a757c5f8edc125aede78595997"
513
513
  }
514
514
  ],
515
515
  "generated_runtime": [
@@ -1,4 +1,4 @@
1
- (()=>{"use strict";var e={c0450586011d(e,a,s){s.a(e,async(e,t)=>{try{s.d(a,{Dk:()=>T,Ue:()=>J,Xx:()=>L,_i:()=>ce,nD:()=>ue,nK:()=>ke});var n=s("d7f974466839"),o=s("58661bec99a6"),i=s("8c672a55a76a"),l=s("c614c5e30b0d"),r=s("67eed2647f47"),m=s("0ab12d47912a"),d=s("5c1dc214bb5e"),f=s("98e26702f55a"),u=s("0d662e4d7d63"),c=e([d,u]);[d,u]=c.then?(await c)():c;var h=s.n(d);const k={en:{phoneLabel:"Phone number",phoneRequired:"Enter a phone number.",countryLabel:"Country code"},ru:{phoneLabel:"Телефон",phoneRequired:"Введите номер телефона.",countryLabel:"Код страны"}},y=()=>globalThis.SF?.Position||h(),p=".sf-country-code",H="sfCountryCodeBound",g=Array.isArray(l?.items)?l.items:[];let E=null,P=0;const C=new WeakMap,b=new WeakMap,R=new WeakMap,j=new WeakMap,w=new WeakMap;function x(e,a){if(!a)return;const s=j.get(a)||{},t=e.querySelector(".sf-country-code-text"),n=e.querySelector(".sf-country-code-hint"),o=C.get(a),i=a.hasAttribute("aria-label")&&a.getAttribute("aria-label")!==o;for(const[e,o]of[["aria-labelledby",t],["aria-describedby",n]]){const t=o?.textContent.trim()?o:null;let n=(a.getAttribute(e)||"").split(/\s+/).filter(Boolean);const l=o&&/^sf-country-\d+$/.test(o.id)&&n.includes(o.id)?o.id:"",r=s[e]||l;n=n.filter(e=>e!==r);const m=t&&("aria-describedby"===e||!i&&0===n.length)?_(t):"";m&&n.push(m);const d=[...new Set(n)].join(" ");d!==(a.getAttribute(e)||"")&&(d?a.setAttribute(e,d):a.removeAttribute(e)),s[e]=m}if(j.set(a,s),t?.textContent.trim()||a.hasAttribute("aria-labelledby"))o&&a.getAttribute("aria-label")===o&&a.removeAttribute("aria-label");else if(!i){const s=(0,u.pageText)(k,"phoneLabel",e,"sf-country-code");a.getAttribute("aria-label")!==s&&a.setAttribute("aria-label",s),C.set(a,s)}}function S(e,a){const s=R.get(a);if(a.validity.customError&&a.validationMessage!==s)return;const t=e.__sfCountryConfig||{},n=String(a.value||"").trim(),o=t.showCode?K(n,e.dataset.dialCode):n,i=a.required&&""!==n&&!/\d/.test(o)?(0,u.pageText)(k,"phoneRequired",e,"sf-country-code"):"";a.setCustomValidity(i),R.set(a,i)}function _(e){if(!e)return"";if(!e.id||document.getElementById(e.id)&&document.getElementById(e.id)!==e)do{e.id="sf-country-"+ ++P}while(document.getElementById(e.id)&&document.getElementById(e.id)!==e);return e.id}function v(e,a){if(!e||e.hasAttribute("aria-labelledby"))return;const s=C.get(e);e.hasAttribute("aria-label")&&e.getAttribute("aria-label")!==s||(e.setAttribute("aria-label",a),C.set(e,a))}function M(e){const{input:a,toggle:s,list:t,items:n}=N(e),o=e.__sfCountryConfig||{},i=e.classList.contains("open"),l=e.__sfCountrySelected,r=(0,u.pageText)(k,"countryLabel",e,"sf-country-code");x(e,a),e.querySelectorAll(".sf-country-code-required, .sf-country-code-left .sf-icon").forEach(e=>e.setAttribute("aria-hidden","true")),s&&(o.multiCountry&&o.showCode&&t?(v(s,`${r}${l?`: ${Z(l,o.locale)}`:""}`),s.setAttribute("role","button"),s.setAttribute("aria-haspopup","listbox"),s.setAttribute("aria-controls",_(t)),s.setAttribute("aria-expanded",String(i))):(s.removeAttribute("aria-haspopup"),s.removeAttribute("aria-controls"),s.removeAttribute("aria-expanded"),s.removeAttribute("aria-disabled"),s.removeAttribute("role"),s.getAttribute("aria-label")===C.get(s)&&(s.removeAttribute("aria-label"),C.delete(s)),s.tabIndex=-1)),t&&(t.setAttribute("role","listbox"),v(t,r),t.setAttribute("aria-hidden",String(!i)),t.inert=!i);let m=!1;for(const e of n){const a=!m&&!!l&&(l.iso2?L(e.dataset.iso2)===l.iso2:e.dataset.code===l.dialCode);m||=a,e.setAttribute("role","option"),e.setAttribute("aria-selected",String(a)),e.tabIndex=i&&e===document.activeElement?0:-1}}function A(e,a=!1){return null==e||""===e?a:"boolean"==typeof e?e:["1","true","yes","on","active","open","disabled"].includes(String(e).toLowerCase())}function L(e){return String(e||"").trim().toUpperCase()}function T(){const e="undefined"!=typeof window?window.sfPath:"";if(!e)return"";try{return new URL("component/flag/flags/rect",e).href.replace(/\/$/,"")}catch{return String(e).replace(/\/$/,"")+"/component/flag/flags/rect"}}function I(e,a){const s=L(e).toLowerCase();return s&&a?`${a}/${s}.svg`:""}function B(e){if(!e||"1"===e.dataset.loaded)return;const a=e.dataset.flagSrc||"";a&&(e.src=a,e.dataset.loaded="1")}function $(e,a=!0){if(!e)return;if(!a)return void B(e);const s=(E||!("IntersectionObserver"in window)||(E=new IntersectionObserver(e=>{e.forEach(e=>{if(!e.isIntersecting)return;const a=e.target;B(a),E?.unobserve?.(a)})},{rootMargin:"120px"})),E);s?s.observe(e):B(e)}function F(e,a,s=!0){const t=document.createElement("div");t.classList.add("sf-country-code-flag"),t.setAttribute("aria-hidden","true");const n=e?.flagEmoji||"",o=I(e?.iso2,a.flagBase);if(!o)return t.textContent=n,t;const i=document.createElement("img");return i.alt=e?.iso2?`${e.iso2} flag`:"flag",i.decoding="async",i.loading="lazy",i.dataset.flagSrc=o,i.dataset.flagFallback=n,i.addEventListener("error",()=>{t.textContent=n},{once:!0}),$(i,s&&a.lazyFlags),t.append(i),t}function N(e){return{input:e?.querySelector?.(".sf-country-code-field input")||null,toggle:e?.querySelector?.(".sf-country-code-left")||null,list:e?.querySelector?.(".sf-country-code-list")||null,itemsWrap:e?.querySelector?.(".sf-country-code-items")||null,items:Array.from(e?.querySelectorAll?.(".sf-country-code-item")||[]),leftFlag:e?.querySelector?.(".sf-country-code-left .sf-country-code-flag-icon")||e?.querySelector?.(".sf-country-code-left .sf-country-code-flag")||null}}function O(e){const a=L(e);return a&&g.find(e=>e.iso2===a)||null}function D(e){const a=String(e||"").trim();return a&&g.find(e=>e.dialCode===a)||null}function q(e,a="native"){const s=String(e||"").trim();if(!s)return s;if("brackets"!==a)return s;const t=s.replace(/[()]/g,""),n=t.match(/^(\+\S+)\s+(.+)$/);if(!n)return t;const o=n[1],i=n[2].trim();if(!i)return t;const l=i.indexOf(" ");let r=l>=0?i.slice(0,l):i,m=l>=0?i.slice(l+1).trim():"",d=r;if(r.includes("-")){const[e,...a]=r.split("-");d=e;m=[a.join("-"),m].filter(Boolean).join(" ")}return d?`${o} (${d})${m?` ${m}`:""}`.trim():t}function z(e,a,s=""){const t=String(e||"");if(!t)return"";const n=a||"_",o=String(s||"").replace(/\D/g,"");let i=0;return t.replace(/0/g,()=>{if(i<o.length){const e=o[i];return i+=1,e}return n})}function G(e){return String(e).replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function K(e,a){const s=String(e||"").trim();if(!s)return"";if(a){const e=G(a.trim()),t=new RegExp(`^${e}[\\s\\-()]*`,"i"),n=s.replace(t,"").trim();if(n!==s)return n}return s.replace(/^\+\d+[\s\-()]*/,"").trim()}function U(e=null){document.querySelectorAll(p).forEach(a=>{e&&a===e||V(a,!1)})}function V(e,a){if(!e)return;const{input:s}=N(e);(s?.disabled||e.classList.contains("disabled")||!1===e.__sfCountryConfig?.multiCountry)&&(a=!1),a?e.classList.add("open"):e.classList.remove("open"),M(e),e.__sfCountryViewport?.(a)}function W(e,a){const s=String(e.dataset.locale||a?.dataset.locale||(0,u.pageLanguage)(e)).toLowerCase(),t="brackets"===String(e.dataset.maskStyle??a?.dataset.maskStyle??"native").toLowerCase()?"brackets":"native";return{locale:"ru"===s?"ru":"en",useMask:A(e.dataset.useMask??a?.dataset.useMask,!1),useCountryMasks:A(e.dataset.useCountryMasks??a?.dataset.useCountryMasks,!0),showCode:A(e.dataset.showCode??a?.dataset.showCode,!0),maskStyle:t,multiCountry:A(e.dataset.multiCountry??a?.dataset.multiCountry,!0),defaultIso2:L(e.dataset.iso2??a?.dataset.iso2),fixedDialCode:String(e.dataset.dialCode??a?.dataset.dialCode??"").trim(),fixedMaskPattern:String(e.dataset.maskPattern??a?.dataset.maskPattern??"").trim(),flagBase:String(e.dataset.flagBase||a?.dataset.flagBase||"").trim()||T(),lazyFlags:A(e.dataset.lazyFlags??a?.dataset.lazyFlags,!0),showMaskPlaceholder:A(e.dataset.showMaskPlaceholder??a?.dataset.showMaskPlaceholder,!1),maskPlaceholderChar:String(e.dataset.maskPlaceholderChar??a?.dataset.maskPlaceholderChar??"_"),maxItems:Number.parseInt(e.dataset.maxItems||a?.dataset.maxItems||"0",10)||0}}function Z(e,a){if(!e)return"";if(e.label)return String(e.label);const s=("en"===a?e.nameEn||e.nameRu:e.nameRu||e.nameEn)||e.iso2;return s?`${s} (${e.dialCode})`:String(e.dialCode||"")}function J(e,a="ru",s=0){let t=Array.isArray(e)&&e.length?e:g;return Number(s)>0&&(t=t.slice(0,Number(s))),t.filter(e=>e&&"object"==typeof e).map(e=>{const s=L(e.iso2),t=String(e.dialCode||e.code||"").trim(),n=O(s)||!s&&D(t)||{},o={...n,...e,iso2:s||n.iso2||"",dialCode:t||n.dialCode||""};return o.label=Z(o,a),o})}function Y(e,a){const s=e.cloneNode(!0);return s.querySelectorAll('.sf-country-code-flag, [aria-hidden="true"]').forEach(e=>e.remove()),J([{iso2:e.dataset.iso2,code:e.dataset.code,label:s.textContent.trim(),...e.hasAttribute("data-mask-pattern")?{maskPattern:e.dataset.maskPattern}:{}}],a)[0]}function X(e,a="",s=""){const t=e.__sfCountryOptions||[],n=L(a),o=String(s||"").trim();return n&&t.find(e=>e.iso2===n)||o&&t.find(e=>e.dialCode===o)||O(n)||D(o)}function Q(e,a){const{list:s,itemsWrap:t}=N(e);if(s&&t)return{list:s,itemsWrap:t};const n=document.createElement("span");n.classList.add("sf-country-code-list");const o=document.createElement("span");o.classList.add("sf-country-code-items","flex","flex-col"),n.append(o);const i=e.querySelector(".sf-country-code-field");return i?i.insertAdjacentElement("afterend",n):e.append(n),a.multiCountry||n.classList.add("hidden"),{list:n,itemsWrap:o}}function ee(e,a){if(!a.multiCountry)return;const{itemsWrap:s}=Q(e,a);if(!s)return;if(s.children.length>0)return;const t=a.maxItems>0?g.slice(0,a.maxItems):g,n=document.createDocumentFragment();t.forEach(e=>{const s=document.createElement("span");s.classList.add("sf-country-code-item","flex","items-center","transition"),s.dataset.iso2=e.iso2,s.dataset.code=e.dialCode,e.maskPattern&&(s.dataset.maskPattern=e.maskPattern);const t=F(e,a,!0),o=document.createElement("span");o.textContent=Z(e,a.locale),s.append(t,o),n.append(s)}),s.append(n)}function ae(e){const{list:a}=N(e);a&&a.querySelectorAll("img[data-flag-src]").forEach(e=>$(e,!0))}function se(e,a=8){const{list:s,itemsWrap:t}=N(e);if(!s||!t||a<=0||!e.classList.contains("open"))return 0;const n=Array.from(t.querySelectorAll(".sf-country-code-item")).slice(0,a),o=n.map(e=>e.offsetHeight);if(!o.some(Boolean))return 0;const i=window.getComputedStyle(t),l=Number.parseFloat(i.rowGap||"")||Number.parseFloat(i.gap||"")||0,r=o.reduce((e,a)=>e+a,0)+(n.length-1)*l+(Number.parseFloat(i.paddingTop||"")||0)+(Number.parseFloat(i.paddingBottom||"")||0);return Object.assign(t.style,{maxHeight:`${r}px`,minHeight:"0",overflowY:"auto",overflowX:"hidden"}),r}function te(e){const{list:a,itemsWrap:s}=N(e);if(!a||!s)return;let t=null,n=null;e.__sfCountryViewport=s=>{if(s&&!t&&e.isConnected)n=["display","flex-direction","overflow"].map(e=>[e,a.style.getPropertyValue(e),a.style.getPropertyPriority(e)]),Object.assign(a.style,{display:"flex",flexDirection:"column",overflow:"hidden"}),se(e),t=y().anchor(e,a,{side:"block-end",align:"start",matchWidth:!0,fitHeight:!0,onPosition:()=>{const a=e.getBoundingClientRect();(a.bottom<=0||a.top>=window.innerHeight)&&V(e,!1)}});else if(!s&&t){t.stop(),t=null;for(const[e,s,t]of n)s?a.style.setProperty(e,s,t):a.style.removeProperty(e)}else s&&t&&(se(e),t.update())}}function ne(e,a){for(let s=e;s;s=Object.getPrototypeOf(s)){const e=Object.getOwnPropertyDescriptor(s,a);if(e)return"function"==typeof e.set||!0===e.writable}return!1}async function oe(e,a,s,t=null){if(!a)return;const n=Symbol("country-code-mask");if(e.__sfCountryMaskToken=n,e.__sfCountryMask&&(window.SF?.Mask?.destroy?.(e.__sfCountryMask),delete e.__sfCountryMask),!s)return;const o=await(0,m.y)();if(n!==e.__sfCountryMaskToken)return;const i=a.value;try{const l=t||e.__sfCountryConfig||W(e,a),r=""!==String(i||"").trim(),m=l.showMaskPlaceholder&&r;if(!r&&s){const t=e?.dataset?.dialCode||l.fixedDialCode||"";a.placeholder=z(s,l.maskPlaceholderChar||"_",t)}const d=await o.create(a,{mask:s,lazy:!m,placeholderChar:l.maskPlaceholderChar||"_"});if(!d||n!==e.__sfCountryMaskToken)return void window.SF?.Mask?.destroy?.(d);if(e.__sfCountryMask=d,i){const e=String(i).replace(/\D+/g,"");e&&ne(d,"unmaskedValue")?d.unmaskedValue=e:ne(d,"value")&&(d.value=String(i)),"function"==typeof d.updateValue&&d.updateValue(),a.value=d.value||a.value}S(e,a)}catch(e){console.warn("SF.CountryCode mask init failed",e)}}function ie(e,a){return X(a,e.defaultIso2)||X(a,"",e.fixedDialCode)||a.__sfCountryOptions?.[0]||g[0]||null}function le(e){const{input:a,toggle:s}=N(e);if(!a)return;const t=e.classList.contains("disabled"),n=A(a.disabled,!1),o=t||n;e.classList.toggle("disabled",o),s&&(s.setAttribute("aria-disabled",o?"true":"false"),s.tabIndex=o?-1:0),o&&V(e,!1),M(e)}function re(e,a){if(!a?.showCode)return"";const s=String(e?.dataset?.dialCode||"").trim();return s?`${s} `:""}function me(e,a,s){if(!a)return;const t=re(e,s);if(!t)return;const n=String(a.value||"");if(n.startsWith(t))return;const o=K(n,e?.dataset?.dialCode||"");a.value=`${t}${o}`.trimEnd()}function de(e,a){if(!e||!a)return;const s=e.selectionStart??0,t=e.selectionEnd??0;if(s>=a.length&&t>=a.length)return;const n=a.length;e.setSelectionRange(n,n)}function fe(e,a,s="runtime"){if(!e||!a)return;const{input:t,leftFlag:n}=N(e);if(!t)return;const o=e.__sfCountryConfig||W(e,t),i=e.dataset.dialCode||"";e.dataset.iso2=a.iso2,e.dataset.dialCode=a.dialCode,e.dataset.maskPattern=a.maskPattern||"";const l=w.get(e);if(l&&(l.selected=e.dataset.maskPattern),e.__sfCountrySelected=a,o.showCode&&n){const e=F(a,o,!1),s=e.querySelector("img");n.textContent="",s?n.append(s):n.textContent=e.textContent||""}if("item"===s||"state"===s){const s=K(t.value,i);oe(e,t,"",o);const n=a.dialCode?`${a.dialCode} `:"";t.value=`${n}${s}`.trim(),t.dispatchEvent(new Event("input",{bubbles:!0})),t.dispatchEvent(new Event("change",{bubbles:!0}))}if(o.useMask){oe(e,t,q(o.useCountryMasks?a.maskPattern:o.fixedMaskPattern||a.maskPattern,o.maskStyle),o)}else oe(e,t,"",o);M(e),S(e,t)}function ue(e,{resetCountry:a=!1,countries:s,maskPattern:t}={}){if((0,f.vl)(e,"sf-country-code"),e?.__sfCountryCodeBind&&e.__sfCountryCodeBind!==ue)return e.__sfCountryCodeBind(e,{resetCountry:a,countries:s,maskPattern:t});if(!e||"function"==typeof e.__sfCountryCodeInput)return;const{input:n,toggle:o,leftFlag:i}=N(e);if(!n)return;e.__sfCountryCodeBind=ue,e.__sfCountryCodeSetState=ke;const l=W(e,n),m=w.get(e),d=void 0!==t?String(t).trim():m&&l.fixedMaskPattern===m.selected?m.fixed:l.fixedMaskPattern;l.fixedMaskPattern=d,w.set(e,{fixed:d,selected:e.dataset.maskPattern}),e.__sfCountryConfig=l,ee(e,l),se(e,8);const u=N(e),c=u.items;if(te(e),e.__sfCountryOptions=void 0===s?c.map(e=>Y(e,l.locale)):J(s,l.locale,l.maxItems),!l.showCode&&o?o.classList.add("hidden"):o&&o.classList.remove("hidden"),l.multiCountry)e.classList.remove("sf-country-code--fixed-dial-code"),u.list?.classList?.remove("hidden");else{e.classList.add("sf-country-code--fixed-dial-code"),e.classList.remove("open"),u.list?.classList?.add("hidden");const a=o?.querySelector?.(".sf-icon");a&&a.remove()}const h=ie(l,e);!a&&b.has(n)||b.set(n,h),h?fe(e,h,"init"):i&&(i.textContent="");const k=a=>{if(a.preventDefault(),!l.multiCountry||n.disabled||e.classList.contains("disabled"))return;const s=!e.classList.contains("open");U(e),V(e,s),s&&ae(e)},y=a=>{a.altKey||a.ctrlKey||a.metaKey||n.disabled||e.classList.contains("disabled")||!l.multiCountry||("Enter"!==a.key&&" "!==a.key||(a.preventDefault(),k(a),e.classList.contains("open")&&P()),"ArrowDown"!==a.key&&"ArrowUp"!==a.key||(a.preventDefault(),e.classList.contains("open")||k(a),P("ArrowUp"===a.key?-1:void 0)),"Escape"===a.key&&V(e,!1))},p=a=>{e.contains(a.target)||V(e,!1)},g=a=>{if(a.preventDefault(),n.disabled||e.classList.contains("disabled")||!l.multiCountry)return;const s=a.currentTarget;if("true"===s.getAttribute("aria-disabled")||s.classList.contains("disabled"))return;const t=Y(s,l.locale);t&&(fe(e,t,"item"),V(e,!1),("keydown"===a.type?o:n)?.focus({preventScroll:!0}))},E=()=>c.filter(e=>"true"!==e.getAttribute("aria-disabled")&&!e.classList.contains("disabled")&&!e.hidden),P=e=>{const a=E(),s=a.findIndex(e=>"true"===e.getAttribute("aria-selected")),t=void 0===e?Math.max(0,s):e<0?a.length-1:Math.min(e,a.length-1);c.forEach(e=>{e.tabIndex=-1});const n=a[t];if(!n)return;n.tabIndex=0,n.focus({preventScroll:!0});const o=u.itemsWrap;if(o){const e=o.getBoundingClientRect(),a=n.getBoundingClientRect();a.top<e.top?o.scrollTo({top:o.scrollTop-(e.top-a.top),behavior:"instant"}):a.bottom>e.bottom&&o.scrollTo({top:o.scrollTop+(a.bottom-e.bottom),behavior:"instant"})}};let C="",R=0;const j=a=>{if(a.altKey||a.ctrlKey||a.metaKey||n.disabled||e.classList.contains("disabled"))return;const s=E(),t=s.indexOf(a.currentTarget);if("Escape"===a.key)return a.preventDefault(),V(e,!1),void o?.focus({preventScroll:!0});if("Enter"!==a.key&&" "!==a.key){if(["ArrowDown","ArrowUp","Home","End"].includes(a.key)){a.preventDefault();const e="Home"===a.key?0:"End"===a.key?s.length-1:Math.max(0,t+("ArrowDown"===a.key?1:-1));return void P(e)}if(1===a.key.length){const e=performance.now();C=e-R>700?a.key:C+a.key,R=e;const n=[...C].every(e=>e===C[0])?C[0]:C,o=[...s.slice(t+1),...s.slice(0,t+1)].find(e=>(e.querySelector("span")?.textContent||e.textContent).trim().toLocaleLowerCase().startsWith(n.toLocaleLowerCase()));o&&(a.preventDefault(),P(s.indexOf(o)))}}else g(a)},_=a=>{e.contains(a.relatedTarget)||V(e,!1)},v=()=>{me(e,n,l),de(n,re(e,l)),S(e,n)},M=()=>{requestAnimationFrame(()=>{me(e,n,l),de(n,re(e,l))})},A=a=>{const s=re(e,l);if(!s)return;if(!["Backspace","Delete"].includes(a.key))return;const t=n.selectionStart??0,o=n.selectionEnd??t;return"Backspace"===a.key&&t<=s.length||"Delete"===a.key&&t<s.length?(a.preventDefault(),void de(n,s)):void((t<s.length||o<s.length)&&(a.preventDefault(),de(n,s)))};o&&(o.addEventListener("click",k),o.addEventListener("keydown",y),o.setAttribute("role","button")),n.addEventListener("input",v),n.addEventListener("paste",M),n.addEventListener("keydown",A),c.forEach(e=>{e.addEventListener("click",g),e.addEventListener("keydown",j)}),e.addEventListener("focusout",_),document.addEventListener("click",p),e.__sfCountryCodeToggleClick=k,e.__sfCountryCodeToggleKeydown=y,e.__sfCountryCodeDocClick=p,e.__sfCountryCodeItemClick=g,e.__sfCountryCodeItemKeydown=j,e.__sfCountryCodeFocusOut=_,e.__sfCountryCodeInput=v,e.__sfCountryCodePaste=M,e.__sfCountryCodeInputKeydown=A,e.__sfCountryReleaseReset=(0,r.z)(n,()=>{const a=b.get(n);a&&fe(e,a,"reset"),V(e,!1),S(e,n)}),e.__sfCountryRequiredObserver=new MutationObserver(()=>{S(e,n),x(e,n)}),e.__sfCountryRequiredObserver.observe(e,{attributes:!0,attributeFilter:["required","aria-label","aria-labelledby","aria-describedby","id"],childList:!0,characterData:!0,subtree:!0}),e.dataset[H]="1",le(e),e.__sfCountryViewport?.(e.classList.contains("open"))}function ce(e){if(!e||"function"!=typeof e.__sfCountryCodeInput)return;const{input:a,toggle:s,items:t}=N(e);e.__sfCountryReleaseReset?.(),delete e.__sfCountryReleaseReset,e.__sfCountryRequiredObserver?.disconnect(),delete e.__sfCountryRequiredObserver,e.__sfCountryViewport?.(!1),delete e.__sfCountryViewport,e.querySelectorAll("img[data-flag-src]").forEach(e=>E?.unobserve(e)),s&&e.__sfCountryCodeToggleClick&&s.removeEventListener("click",e.__sfCountryCodeToggleClick),s&&e.__sfCountryCodeToggleKeydown&&s.removeEventListener("keydown",e.__sfCountryCodeToggleKeydown),e.__sfCountryCodeDocClick&&document.removeEventListener("click",e.__sfCountryCodeDocClick),t.forEach(a=>{e.__sfCountryCodeItemKeydown&&a.removeEventListener("keydown",e.__sfCountryCodeItemKeydown),e.__sfCountryCodeItemClick&&a.removeEventListener("click",e.__sfCountryCodeItemClick)}),e.__sfCountryCodeFocusOut&&e.removeEventListener("focusout",e.__sfCountryCodeFocusOut),a&&e.__sfCountryCodeInput&&a.removeEventListener("input",e.__sfCountryCodeInput),a&&e.__sfCountryCodePaste&&a.removeEventListener("paste",e.__sfCountryCodePaste),a&&e.__sfCountryCodeInputKeydown&&a.removeEventListener("keydown",e.__sfCountryCodeInputKeydown),e.__sfCountryMask&&window.SF?.Mask?.destroy?.(e.__sfCountryMask),delete e.__sfCountryCodeToggleClick,delete e.__sfCountryCodeToggleKeydown,delete e.__sfCountryCodeDocClick,delete e.__sfCountryCodeItemClick,delete e.__sfCountryCodeItemKeydown,delete e.__sfCountryCodeFocusOut,delete e.__sfCountryCodeInput,delete e.__sfCountryCodePaste,delete e.__sfCountryCodeInputKeydown,delete e.__sfCountryMask,delete e.__sfCountryMaskToken,delete e.__sfCountrySelected,delete e.__sfCountryConfig,delete e.__sfCountryOptions,delete e.dataset[H]}function he(e=document){e.querySelectorAll(p).forEach(e=>{e.closest("sf-country-code")||ue(e)})}function ke(e,a={}){const s=e instanceof HTMLElement?e.closest(p)||e:null;if(!s)return!1;if(s.__sfCountryCodeSetState&&s.__sfCountryCodeSetState!==ke)return s.__sfCountryCodeSetState(s,a);const{input:t}=N(s);if(!t)return!1;if(Object.prototype.hasOwnProperty.call(a,"disabled")){const e=A(a.disabled,!1);t.disabled=e,s.classList.toggle("disabled",e),le(s)}if(Object.prototype.hasOwnProperty.call(a,"active")&&V(s,A(a.active,!1)),Object.prototype.hasOwnProperty.call(a,"open")&&V(s,A(a.open,!1)),Object.prototype.hasOwnProperty.call(a,"value")&&(t.value=String(a.value??""),t.dispatchEvent(new Event("input",{bubbles:!0})),t.dispatchEvent(new Event("change",{bubbles:!0}))),Object.prototype.hasOwnProperty.call(a,"iso2")){const e=X(s,a.iso2);e&&fe(s,e,"state")}if(Object.prototype.hasOwnProperty.call(a,"dialCode")){const e=X(s,"",a.dialCode);e&&fe(s,e,"state")}return!0}class ye extends n.y{static componentName="CountryCode";html=null;constructor(e){super(e);const{size:a="1",label:s="",required:t=!1,name:n="",form:o="",hint:i="",value:l="",placeholder:r="+7(___)___-__-__",disabled:m=!1,active:d=!1,open:u=d,countries:c=[],locale:h="ru",useMask:k=!1,useCountryMasks:y=!0,showCode:p=!0,maskStyle:H="native",multiCountry:g=!0,iso2:E="",dialCode:P="",maskPattern:C="",flagBase:b="",lazyFlags:R=!0,showMaskPlaceholder:j=!1,maskPlaceholderChar:w="_",maxItems:x=0}=this.params||{},S=this.attrs.class||this.attrs.className;this.template=document.createElement("label"),this.id&&(this.template.id=this.id),this.template.classList.add("sf-country-code",`sf-country-code--size-${(0,f.id)(a,"sf-country-code")}`),A(m)&&this.template.classList.add("disabled"),A(u)&&this.template.classList.add("open"),S&&this.template.classList.add(...`${S}`.split(" ").filter(Boolean)),this.template.dataset.locale=String(h),this.template.dataset.useMask=String(A(k,!1)),this.template.dataset.useCountryMasks=String(A(y,!0)),this.template.dataset.showCode=String(A(p,!0)),this.template.dataset.maskStyle="brackets"===String(H).toLowerCase()?"brackets":"native",this.template.dataset.multiCountry=String(A(g,!0)),this.template.dataset.lazyFlags=String(A(R,!0)),this.template.dataset.showMaskPlaceholder=String(A(j,!1)),this.template.dataset.maskPlaceholderChar=String(w||"_"),E&&(this.template.dataset.iso2=L(E)),P&&(this.template.dataset.dialCode=String(P)),C&&(this.template.dataset.maskPattern=String(C)),b&&(this.template.dataset.flagBase=String(b).replace(/\/$/,"")),Number(x)>0&&(this.template.dataset.maxItems=String(Number(x)));const _=document.createElement("span");_.classList.add("sf-country-code-label");const v=document.createElement("span");if(v.classList.add("sf-country-code-text"),v.textContent=String(s),_.append(v),A(t,!1)){const e=document.createElement("span");e.classList.add("sf-country-code-required"),e.textContent="*",_.append(e)}const M=document.createElement("span");M.classList.add("sf-country-code-field");const I=document.createElement("span");I.classList.add("sf-country-code-left");const B=document.createElement("div");B.classList.add("sf-country-code-flag-icon"),B.setAttribute("aria-hidden","true");const $=document.createElement("i");$.classList.add("sf-icon"),$.textContent=A(u)?"expand_less":"expand_more",I.append(B,$);const N=document.createElement("input");N.type="tel",N.name=String(n),o&&N.setAttribute("form",String(o)),N.required=A(t,!1),N.defaultValue=String(l??""),N.placeholder=String(r??""),N.disabled=A(m,!1),M.append(I,N),this.template.append(_,M);const O=J(c,h,x);if(O.length){const e=document.createElement("span");e.classList.add("sf-country-code-list");const a=document.createElement("span");a.classList.add("sf-country-code-items","flex","flex-col"),O.forEach(e=>{const s=document.createElement("span");s.classList.add("sf-country-code-item"),e?.iso2&&(s.dataset.iso2=L(e.iso2)),(e?.dialCode||e?.code)&&(s.dataset.code=String(e.dialCode||e.code)),void 0!==e?.maskPattern&&(s.dataset.maskPattern=String(e.maskPattern||""));const t=F({iso2:e?.iso2,flagEmoji:e?.flagEmoji||""},{flagBase:this.template.dataset.flagBase||T(),lazyFlags:A(this.template.dataset.lazyFlags,!0)},!0),n=document.createElement("span");if(e?.label)n.textContent=String(e.label);else{const a=e?.nameRu||e?.nameEn||e?.dialCode||"",s=e?.dialCode||e?.code||"";n.textContent=s?`${a} (${s})`:a}s.append(t,n),this.applyLayoutUtilities(s,".sf-country-code .sf-country-code-item"),this.applyLayoutUtilities(t,".sf-country-code .sf-country-code-flag"),a.append(s)}),e.append(a),this.template.append(e)}if(i){const e=document.createElement("span");e.classList.add("sf-country-code-hint"),e.textContent=String(i),this.template.append(e)}this.applyLayoutUtilities(this.template,".sf-country-code"),this.applyLayoutUtilities(_,".sf-country-code .sf-country-code-label"),this.applyLayoutUtilities(M,".sf-country-code .sf-country-code-field"),this.applyLayoutUtilities(I,".sf-country-code .sf-country-code-left"),this.applyLayoutUtilities(N,".sf-country-code .sf-country-code-field input"),this.applyLayoutUtilities(B,".sf-country-code .sf-country-code-flag-icon")}init(){ue(this.template,{maskPattern:this.params?.maskPattern||""})}destroyInternal(){ce(this.template)}}ye.utilityMap=i,(0,o.A)("CountryCode",ye),"undefined"!=typeof window&&(window.SF=window.SF||{},window.SF.CountryCode=window.SF.CountryCode||{},window.SF.CountryCode.setState=ke),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>he()):he();new MutationObserver(e=>{e.forEach(e=>{e.removedNodes.forEach(e=>{if(!(e instanceof Element))return;const a=[...e.querySelectorAll(p)];e.matches(p)&&a.unshift(e);for(const e of a)e.isConnected||e.closest("sf-country-code")||ce(e)}),e.addedNodes.forEach(e=>{e instanceof Element&&(e.matches?.(p)&&!e.closest("sf-country-code")&&ue(e),he(e))})})}).observe(document.documentElement,{childList:!0,subtree:!0}),t()}catch(pe){t(pe)}})},"98e26702f55a"(e,a,s){function t(){const e=globalThis.SF=globalThis.SF||{};return e.__deprecationNotes instanceof Map||Object.defineProperty(e,"__deprecationNotes",{value:new Map,configurable:!0}),e.__deprecationNotes}function n({component:e="",kind:a="attribute",attribute:s="",from:n,to:o=null}={}){if(!n)return;const i=[e,a,s,n].join("|"),l=t(),r=l.get(i);if(r)r.count+=1;else if(l.set(i,{component:e,kind:a,attribute:s,from:n,to:o,count:1}),function(){const e=globalThis.document?.documentElement;return"warn"===e?.dataset?.sfDeprecations||!0===globalThis.SF?.deprecations?.warn}()){const t=e?`${e}: `:"",i="value"===a?`${s}="${n}"`:`${a} ${n}`;globalThis.console?.warn?.(`[SIMAI Framework] ${t}${i} is a legacy name${o?`; write ${o}`:""}. See contracts/changes/journal.json.`)}}if(s.d(a,{id:()=>r,vl:()=>m}),"undefined"!=typeof globalThis){globalThis.SF=globalThis.SF||{};const e=globalThis.SF.deprecations||{};e.list=function(){return[...t().values()].map(e=>({...e}))},e.clear=function(){t().clear()},e.note=n,globalThis.SF.deprecations=e}const o=Object.freeze(["1/2","1","2"]),i=Object.freeze({"1/3":"1/2",3:"2"}),l=new Set;function r(e,a="field",s="1"){const t=String(e??"").trim().toLowerCase();if(o.includes(t))return t;if(Object.hasOwn(i,t)){const e=i[t];n({component:a,kind:"value",attribute:"size",from:t,to:e});const s=`${a}:${t}`;return l.has(s)||"undefined"==typeof console||(l.add(s),console.warn(`[SIMAI Framework] ${a}: size ${t} is retired for form fields; rendering size ${e}.`)),e}return s}function m(e,a){if(e?.classList)for(const[s,t]of Object.entries(i)){const t=`${a}--size-${s}`;e.classList.contains(t)&&e.classList.replace(t,`${a}--size-${r(s,a)}`)}}},"67eed2647f47"(e,a,s){s.d(a,{z:()=>o});const t=new WeakMap,n=new WeakSet;function o(e,a){const s=e.ownerDocument;n.has(s)||(s.addEventListener("reset",e=>{const a=e.target;if("FORM"!==a?.tagName)return;const s=Array.from(a.elements);setTimeout(()=>{if(!e.defaultPrevented)for(const e of s)if(e.isConnected&&e.form===a)for(const a of t.get(e)||[])a()},0)},!0),n.add(s));let o=t.get(e);return o||t.set(e,o=new Set),o.add(a),()=>o.delete(a)}},"0ab12d47912a"(e,a,s){s.d(a,{y:()=>n});let t=null;function n(){const e=()=>window.SF?.Mask?.create?window.SF.Mask:null,a=e();return a?Promise.resolve(a):t||(t=new Promise(a=>{const s=[[window,"sf-mask-ready"],[window,"sf-loader-ready"],[window,"load"],[document,"DOMContentLoaded"]],n=()=>{const o=e();o&&(s.forEach(([e,a])=>e.removeEventListener(a,n)),t=null,a(o))};s.forEach(([e,a])=>e.addEventListener(a,n))}),t)}},"58661bec99a6"(e,a,s){const t=function(e,a){if(e&&a)if("undefined"==typeof window||"function"!=typeof window.registerSfComponent){if("undefined"!=typeof window&&window.SF?.Loader?.registerComponent)window.SF.Loader.registerComponent(e,a);else if("undefined"!=typeof window){(window.SF_PENDING_COMPONENTS=window.SF_PENDING_COMPONENTS||[]).push([e,a])}}else window.registerSfComponent(e,a)};s.d(a,["A",0,t])},d7f974466839(e,a,s){s.d(a,{y:()=>t});class t{lifecycleName(){return this.componentName??this.constructor.componentName}constructor(e){this.props=e,this.id=e?.id,this.params=e?.param,this.attrs=e?.attrs||{},this.template=null,window.dispatchEvent(new CustomEvent(`${this.lifecycleName()}:beforeRender`,{detail:this}))}getUtilityMap(){return this.constructor.utilityMap||null}extractUtilityClasses(e){if(!Array.isArray(e))return[];const a=new Set;return e.forEach(e=>{if("string"!=typeof e)return;const s=e.match(/\(([^)]+)\)/g);s&&s.forEach(e=>{e.slice(1,-1).split(/\s+/).filter(Boolean).forEach(e=>{e.startsWith(".")&&e.length>1&&a.add(e.slice(1))})})}),Array.from(a)}applyLayoutUtilities(e,a){if(!e||!a)return;const s=this.getUtilityMap();if(!s||!s[a])return;this.extractUtilityClasses(s[a]).forEach(a=>e.classList.add(a))}render(){return this.html=this.template,"function"==typeof this.init&&this.init(),this.html&&window.dispatchEvent(new CustomEvent(`${this.lifecycleName()}:render`,{detail:this})),this.html}destroy(){this.destroyInternal?.(),this.props=null,this.id=null,this.params=null,this.template=null,this.html&&(this.html.remove(),this.html=null),window.dispatchEvent(new CustomEvent(`${this.lifecycleName()}:destroy`,{detail:this}))}destroyInternal(){}}},"2a25b3f4fc15"(e,a,s){s.a(e,async(e,a)=>{try{var t=s("c614c5e30b0d"),n=s("0d662e4d7d63"),o=s("c0450586011d"),i=s("fbe0570fcc69"),l=s("98e26702f55a"),r=s("788779012d8a"),m=e([n,o,i,r]);[n,o,i,r]=m.then?(await m)():m;var d=s.n(i);const f=".sf-country-code",u=Array.isArray(t?.items)?t.items:[];class c extends(d()){static get props(){return{size:{default:"1"},label:{default:""},required:{type:Boolean,default:!1},name:{default:""},form:{default:""},hint:{default:""},value:{default:""},placeholder:{default:"+7(___)___-__-__"},disabled:{type:Boolean,default:!1},open:{type:Boolean,default:!1},locale:{default:""},useMask:{type:Boolean,default:!1},useCountryMasks:{type:Boolean,default:!0},showCode:{type:Boolean,default:!0},maskStyle:{default:"native"},multiCountry:{type:Boolean,default:!0},iso2:{default:""},dialCode:{default:""},maskPattern:{default:""},flagBase:{default:""},lazyFlags:{type:Boolean,default:!0},showMaskPlaceholder:{type:Boolean,default:!1},maskPlaceholderChar:{default:"_"},maxItems:{type:Number,default:0}}}constructor(){super(),this._countries=null,this._boundRoot=null,this._renderAttributes=new Set}get size(){return(0,l.id)(this.getAttribute("size")||"1","sf-country-code")}get label(){return this.getAttribute("label")||""}get required(){return this.getBooleanAttr("required",!1)}get hint(){return this.getAttribute("hint")||""}get value(){return this.getAttribute("value")||""}get placeholder(){return this.getAttribute("placeholder")||"+7(___)___-__-__"}get disabled(){return this.getBooleanAttr("disabled",!1)}get open(){return this.getBooleanAttr("open",!1)||this.getBooleanAttr("active",!1)}get locale(){return"ru"===String(this.getAttribute("locale")||(0,n.pageLanguage)(this)).toLowerCase()?"ru":"en"}get useMask(){return this.getBooleanAttr("use-mask",!1)}get useCountryMasks(){return this.getBooleanAttr("use-country-masks",!0)}get showCode(){return this.getBooleanAttr("show-code",!0)}get maskStyle(){return"brackets"===String(this.getAttribute("mask-style")||"native").toLowerCase()?"brackets":"native"}get multiCountry(){return this.getBooleanAttr("multi-country",!0)}get iso2(){return(0,o.Xx)(this.getAttribute("iso2"))}get dialCode(){return String(this.getAttribute("dial-code")||"").trim()}get maskPattern(){return String(this.getAttribute("mask-pattern")||"").trim()}get flagBase(){return String(this.getAttribute("flag-base")||"").trim()||(0,o.Dk)()}get lazyFlags(){return this.getBooleanAttr("lazy-flags",!0)}get showMaskPlaceholder(){return this.getBooleanAttr("show-mask-placeholder",!1)}get maskPlaceholderChar(){return String(this.getAttribute("mask-placeholder-char")||"_")}get maxItems(){return Math.trunc(this.getNumberAttr("max-items",0))}get countries(){return(0,o.Ue)(this._countries,this.locale,this.maxItems)}set countries(e){this._countries=Array.isArray(e)?e:null,this.requestComponentUpdate("countries")}templateContext(){const e=this.getPropsContext(),a=this._boundRoot,s=a&&!this._renderAttributes.has("open")&&!this._renderAttributes.has("active"),t=a&&!this._renderAttributes.has("disabled");return this.createTemplateContext({...e,open:s?a.classList.contains("open"):this.open,disabled:t?!!a.querySelector("input")?.disabled||a.classList.contains("disabled"):this.disabled,countries:this.countries.length?this.countries:(0,o.Ue)(u,this.locale,this.maxItems),locale:this.locale,maskStyle:this.maskStyle,iso2:this.iso2,flagBase:this.flagBase,maxItems:this.maxItems})}onDisconnected(){this._boundRoot&&((0,o._i)(this._boundRoot),this._boundRoot=null)}beforeRender(e=[]){this._renderAttributes=new Set(e)}afterRender(e){if("function"==typeof e)return super.afterRender(e);this._boundRoot&&((0,o._i)(this._boundRoot),this._boundRoot=null),this._boundRoot=this.querySelector(f),this._boundRoot&&(0,o.nD)(this._boundRoot,{resetCountry:this._renderAttributes.has("iso2")||this._renderAttributes.has("dial-code"),countries:this.countries,maskPattern:this.maskPattern})}template(){return(0,r.o)(this.templateContext())}get state(){const e=this.querySelector(f),a=e?.querySelector?.(".sf-country-code-field input")||null;return{value:a?.value||"",iso2:e?.dataset?.iso2||"",dialCode:e?.dataset?.dialCode||"",open:e?.classList?.contains("open")||!1,disabled:e?.classList?.contains("disabled")||!1}}setState(e={}){const a=this.querySelector(f);return(0,o.nK)(a,e)}}c.define("sf-country-code"),a()}catch(e){a(e)}})},"788779012d8a"(e,a,s){s.a(e,async(e,t)=>{try{s.d(a,{o:()=>r});var n=s("ddf1cdb42ecc"),o=e([n]),i=o.then?(await o)():o;n=i[0];function l(e,a=""){const s=String(e?.iso2||"").trim().toLowerCase(),t=e?.flagEmoji||"",o=s&&a?`${a}/${s}.svg`:"";return o?n.html`
1
+ (()=>{"use strict";var e={c0450586011d(e,a,s){s.a(e,async(e,t)=>{try{s.d(a,{Dk:()=>T,Ue:()=>J,Xx:()=>A,_i:()=>ce,nD:()=>ue,nK:()=>ke});var n=s("d7f974466839"),o=s("58661bec99a6"),i=s("8c672a55a76a"),l=s("c614c5e30b0d"),r=s("67eed2647f47"),m=s("0ab12d47912a"),d=s("5c1dc214bb5e"),f=s("98e26702f55a"),u=s("0d662e4d7d63"),c=e([d,u]);[d,u]=c.then?(await c)():c;var h=s.n(d);const k={en:{phoneLabel:"Phone number",phoneRequired:"Enter a phone number.",countryLabel:"Country code"},ru:{phoneLabel:"Телефон",phoneRequired:"Введите номер телефона.",countryLabel:"Код страны"}},y=()=>globalThis.SF?.Position||h(),p=".sf-country-code",H="sfCountryCodeBound",g=Array.isArray(l?.items)?l.items:[];let E=null,P=0;const C=new WeakMap,b=new WeakMap,R=new WeakMap,j=new WeakMap,w=new WeakMap;function x(e,a){if(!a)return;const s=j.get(a)||{},t=e.querySelector(".sf-country-code-text"),n=e.querySelector(".sf-country-code-hint"),o=C.get(a),i=a.hasAttribute("aria-label")&&a.getAttribute("aria-label")!==o;for(const[e,o]of[["aria-labelledby",t],["aria-describedby",n]]){const t=o?.textContent.trim()?o:null;let n=(a.getAttribute(e)||"").split(/\s+/).filter(Boolean);const l=o&&/^sf-country-\d+$/.test(o.id)&&n.includes(o.id)?o.id:"",r=s[e]||l;n=n.filter(e=>e!==r);const m=t&&("aria-describedby"===e||!i&&0===n.length)?_(t):"";m&&n.push(m);const d=[...new Set(n)].join(" ");d!==(a.getAttribute(e)||"")&&(d?a.setAttribute(e,d):a.removeAttribute(e)),s[e]=m}if(j.set(a,s),t?.textContent.trim()||a.hasAttribute("aria-labelledby"))o&&a.getAttribute("aria-label")===o&&a.removeAttribute("aria-label");else if(!i){const s=(0,u.pageText)(k,"phoneLabel",e,"sf-country-code");a.getAttribute("aria-label")!==s&&a.setAttribute("aria-label",s),C.set(a,s)}}function S(e,a){const s=R.get(a);if(a.validity.customError&&a.validationMessage!==s)return;const t=e.__sfCountryConfig||{},n=String(a.value||"").trim(),o=t.showCode?K(n,e.dataset.dialCode):n,i=a.required&&""!==n&&!/\d/.test(o)?(0,u.pageText)(k,"phoneRequired",e,"sf-country-code"):"";a.setCustomValidity(i),R.set(a,i)}function _(e){if(!e)return"";if(!e.id||document.getElementById(e.id)&&document.getElementById(e.id)!==e)do{e.id="sf-country-"+ ++P}while(document.getElementById(e.id)&&document.getElementById(e.id)!==e);return e.id}function v(e,a){if(!e||e.hasAttribute("aria-labelledby"))return;const s=C.get(e);e.hasAttribute("aria-label")&&e.getAttribute("aria-label")!==s||(e.setAttribute("aria-label",a),C.set(e,a))}function M(e){const{input:a,toggle:s,list:t,items:n}=N(e),o=e.__sfCountryConfig||{},i=e.classList.contains("open"),l=e.__sfCountrySelected,r=(0,u.pageText)(k,"countryLabel",e,"sf-country-code");x(e,a),e.querySelectorAll(".sf-country-code-required, .sf-country-code-left .sf-icon").forEach(e=>e.setAttribute("aria-hidden","true")),s&&(o.multiCountry&&o.showCode&&t?(v(s,`${r}${l?`: ${Z(l,o.locale)}`:""}`),s.setAttribute("role","button"),s.setAttribute("aria-haspopup","listbox"),s.setAttribute("aria-controls",_(t)),s.setAttribute("aria-expanded",String(i))):(s.removeAttribute("aria-haspopup"),s.removeAttribute("aria-controls"),s.removeAttribute("aria-expanded"),s.removeAttribute("aria-disabled"),s.removeAttribute("role"),s.getAttribute("aria-label")===C.get(s)&&(s.removeAttribute("aria-label"),C.delete(s)),s.tabIndex=-1)),t&&(t.setAttribute("role","listbox"),v(t,r),t.setAttribute("aria-hidden",String(!i)),t.inert=!i);let m=!1;for(const e of n){const a=!m&&!!l&&(l.iso2?A(e.dataset.iso2)===l.iso2:e.dataset.code===l.dialCode);m||=a,e.setAttribute("role","option"),e.setAttribute("aria-selected",String(a)),e.tabIndex=i&&e===document.activeElement?0:-1}}function L(e,a=!1){return null==e||""===e?a:"boolean"==typeof e?e:["1","true","yes","on","active","open","disabled"].includes(String(e).toLowerCase())}function A(e){return String(e||"").trim().toUpperCase()}function T(){const e="undefined"!=typeof window?window.sfPath:"";if(!e)return"";try{return new URL("component/flag/flags/rect",e).href.replace(/\/$/,"")}catch{return String(e).replace(/\/$/,"")+"/component/flag/flags/rect"}}function I(e,a){const s=A(e).toLowerCase();return s&&a?`${a}/${s}.svg`:""}function B(e){if(!e||"1"===e.dataset.loaded)return;const a=e.dataset.flagSrc||"";a&&(e.src=a,e.dataset.loaded="1")}function $(e,a=!0){if(!e)return;if(!a)return void B(e);const s=(E||!("IntersectionObserver"in window)||(E=new IntersectionObserver(e=>{e.forEach(e=>{if(!e.isIntersecting)return;const a=e.target;B(a),E?.unobserve?.(a)})},{rootMargin:"120px"})),E);s?s.observe(e):B(e)}function F(e,a,s=!0){const t=document.createElement("div");t.classList.add("sf-country-code-flag"),t.setAttribute("aria-hidden","true");const n=e?.flagEmoji||"",o=I(e?.iso2,a.flagBase);if(!o)return t.textContent=n,t;const i=document.createElement("img");return i.alt=e?.iso2?`${e.iso2} flag`:"flag",i.decoding="async",i.loading="lazy",i.dataset.flagSrc=o,i.dataset.flagFallback=n,i.addEventListener("error",()=>{t.textContent=n},{once:!0}),$(i,s&&a.lazyFlags),t.append(i),t}function N(e){return{input:e?.querySelector?.(".sf-country-code-field input")||null,toggle:e?.querySelector?.(".sf-country-code-left")||null,list:e?.querySelector?.(".sf-country-code-list")||null,itemsWrap:e?.querySelector?.(".sf-country-code-items")||null,items:Array.from(e?.querySelectorAll?.(".sf-country-code-item")||[]),leftFlag:e?.querySelector?.(".sf-country-code-left .sf-country-code-flag-icon")||e?.querySelector?.(".sf-country-code-left .sf-country-code-flag")||null}}function O(e){const a=A(e);return a&&g.find(e=>e.iso2===a)||null}function D(e){const a=String(e||"").trim();return a&&g.find(e=>e.dialCode===a)||null}function q(e,a="native"){const s=String(e||"").trim();if(!s)return s;if("brackets"!==a)return s;const t=s.replace(/[()]/g,""),n=t.match(/^(\+\S+)\s+(.+)$/);if(!n)return t;const o=n[1],i=n[2].trim();if(!i)return t;const l=i.indexOf(" ");let r=l>=0?i.slice(0,l):i,m=l>=0?i.slice(l+1).trim():"",d=r;if(r.includes("-")){const[e,...a]=r.split("-");d=e;m=[a.join("-"),m].filter(Boolean).join(" ")}return d?`${o} (${d})${m?` ${m}`:""}`.trim():t}function z(e,a,s=""){const t=String(e||"");if(!t)return"";const n=a||"_",o=String(s||"").replace(/\D/g,"");let i=0;return t.replace(/0/g,()=>{if(i<o.length){const e=o[i];return i+=1,e}return n})}function G(e){return String(e).replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function K(e,a){const s=String(e||"").trim();if(!s)return"";if(a){const e=G(a.trim()),t=new RegExp(`^${e}[\\s\\-()]*`,"i"),n=s.replace(t,"").trim();if(n!==s)return n}return s.replace(/^\+\d+[\s\-()]*/,"").trim()}function U(e=null){document.querySelectorAll(p).forEach(a=>{e&&a===e||V(a,!1)})}function V(e,a){if(!e)return;const{input:s}=N(e);(s?.disabled||e.classList.contains("disabled")||!1===e.__sfCountryConfig?.multiCountry)&&(a=!1),a?e.classList.add("open"):e.classList.remove("open"),M(e),e.__sfCountryViewport?.(a)}function W(e,a){const s=String(e.dataset.locale||a?.dataset.locale||(0,u.pageLanguage)(e)).toLowerCase(),t="brackets"===String(e.dataset.maskStyle??a?.dataset.maskStyle??"native").toLowerCase()?"brackets":"native";return{locale:"ru"===s?"ru":"en",useMask:L(e.dataset.useMask??a?.dataset.useMask,!1),useCountryMasks:L(e.dataset.useCountryMasks??a?.dataset.useCountryMasks,!0),showCode:L(e.dataset.showCode??a?.dataset.showCode,!0),maskStyle:t,multiCountry:L(e.dataset.multiCountry??a?.dataset.multiCountry,!0),defaultIso2:A(e.dataset.iso2??a?.dataset.iso2),fixedDialCode:String(e.dataset.dialCode??a?.dataset.dialCode??"").trim(),fixedMaskPattern:String(e.dataset.maskPattern??a?.dataset.maskPattern??"").trim(),flagBase:String(e.dataset.flagBase||a?.dataset.flagBase||"").trim()||T(),lazyFlags:L(e.dataset.lazyFlags??a?.dataset.lazyFlags,!0),showMaskPlaceholder:L(e.dataset.showMaskPlaceholder??a?.dataset.showMaskPlaceholder,!1),maskPlaceholderChar:String(e.dataset.maskPlaceholderChar??a?.dataset.maskPlaceholderChar??"_"),maxItems:Number.parseInt(e.dataset.maxItems||a?.dataset.maxItems||"0",10)||0}}function Z(e,a){if(!e)return"";if(e.label)return String(e.label);const s=("en"===a?e.nameEn||e.nameRu:e.nameRu||e.nameEn)||e.iso2;return s?`${s} (${e.dialCode})`:String(e.dialCode||"")}function J(e,a="ru",s=0){let t=Array.isArray(e)&&e.length?e:g;return Number(s)>0&&(t=t.slice(0,Number(s))),t.filter(e=>e&&"object"==typeof e).map(e=>{const s=A(e.iso2),t=String(e.dialCode||e.code||"").trim(),n=O(s)||!s&&D(t)||{},o={...n,...e,iso2:s||n.iso2||"",dialCode:t||n.dialCode||""};return o.label=Z(o,a),o})}function Y(e,a){const s=e.cloneNode(!0);return s.querySelectorAll('.sf-country-code-flag, [aria-hidden="true"]').forEach(e=>e.remove()),J([{iso2:e.dataset.iso2,code:e.dataset.code,label:s.textContent.trim(),...e.hasAttribute("data-mask-pattern")?{maskPattern:e.dataset.maskPattern}:{}}],a)[0]}function X(e,a="",s=""){const t=e.__sfCountryOptions||[],n=A(a),o=String(s||"").trim();return n&&t.find(e=>e.iso2===n)||o&&t.find(e=>e.dialCode===o)||O(n)||D(o)}function Q(e,a){const{list:s,itemsWrap:t}=N(e);if(s&&t)return{list:s,itemsWrap:t};const n=document.createElement("span");n.classList.add("sf-country-code-list");const o=document.createElement("span");o.classList.add("sf-country-code-items","flex","flex-col"),n.append(o);const i=e.querySelector(".sf-country-code-field");return i?i.insertAdjacentElement("afterend",n):e.append(n),a.multiCountry||n.classList.add("hidden"),{list:n,itemsWrap:o}}function ee(e,a){if(!a.multiCountry)return;const{itemsWrap:s}=Q(e,a);if(!s)return;if(s.children.length>0)return;const t=a.maxItems>0?g.slice(0,a.maxItems):g,n=document.createDocumentFragment();t.forEach(e=>{const s=document.createElement("span");s.classList.add("sf-country-code-item","flex","items-center","transition"),s.dataset.iso2=e.iso2,s.dataset.code=e.dialCode,e.maskPattern&&(s.dataset.maskPattern=e.maskPattern);const t=F(e,a,!0),o=document.createElement("span");o.textContent=Z(e,a.locale),s.append(t,o),n.append(s)}),s.append(n)}function ae(e){const{list:a}=N(e);a&&a.querySelectorAll("img[data-flag-src]").forEach(e=>$(e,!0))}function se(e,a=8){const{list:s,itemsWrap:t}=N(e);if(!s||!t||a<=0||!e.classList.contains("open"))return 0;const n=Array.from(t.querySelectorAll(".sf-country-code-item")).slice(0,a),o=n.map(e=>e.offsetHeight);if(!o.some(Boolean))return 0;const i=window.getComputedStyle(t),l=Number.parseFloat(i.rowGap||"")||Number.parseFloat(i.gap||"")||0,r=o.reduce((e,a)=>e+a,0)+(n.length-1)*l+(Number.parseFloat(i.paddingTop||"")||0)+(Number.parseFloat(i.paddingBottom||"")||0);return Object.assign(t.style,{maxHeight:`${r}px`,minHeight:"0",overflowY:"auto",overflowX:"hidden"}),r}function te(e){const{list:a,itemsWrap:s}=N(e);if(!a||!s)return;let t=null,n=null;e.__sfCountryViewport=s=>{if(s&&!t&&e.isConnected)n=["display","flex-direction","overflow"].map(e=>[e,a.style.getPropertyValue(e),a.style.getPropertyPriority(e)]),Object.assign(a.style,{display:"flex",flexDirection:"column",overflow:"hidden"}),se(e),t=y().anchor(e,a,{side:"block-end",align:"start",matchWidth:!0,fitHeight:!0,onPosition:()=>{const a=e.getBoundingClientRect();(a.bottom<=0||a.top>=window.innerHeight)&&V(e,!1)}});else if(!s&&t){t.stop(),t=null;for(const[e,s,t]of n)s?a.style.setProperty(e,s,t):a.style.removeProperty(e)}else s&&t&&(se(e),t.update())}}function ne(e,a){for(let s=e;s;s=Object.getPrototypeOf(s)){const e=Object.getOwnPropertyDescriptor(s,a);if(e)return"function"==typeof e.set||!0===e.writable}return!1}async function oe(e,a,s,t=null){if(!a)return;const n=Symbol("country-code-mask");if(e.__sfCountryMaskToken=n,e.__sfCountryMask&&(window.SF?.Mask?.destroy?.(e.__sfCountryMask),delete e.__sfCountryMask),!s)return;const o=await(0,m.y)();if(n!==e.__sfCountryMaskToken)return;const i=a.value;try{const l=t||e.__sfCountryConfig||W(e,a),r=""!==String(i||"").trim(),m=l.showMaskPlaceholder&&r;if(!r&&s){const t=e?.dataset?.dialCode||l.fixedDialCode||"";a.placeholder=z(s,l.maskPlaceholderChar||"_",t)}const d=await o.create(a,{mask:s,lazy:!m,placeholderChar:l.maskPlaceholderChar||"_"});if(!d||n!==e.__sfCountryMaskToken)return void window.SF?.Mask?.destroy?.(d);if(e.__sfCountryMask=d,i){const e=String(i).replace(/\D+/g,"");e&&ne(d,"unmaskedValue")?d.unmaskedValue=e:ne(d,"value")&&(d.value=String(i)),"function"==typeof d.updateValue&&d.updateValue(),a.value=d.value||a.value}S(e,a)}catch(e){console.warn("SF.CountryCode mask init failed",e)}}function ie(e,a){return X(a,e.defaultIso2)||X(a,"",e.fixedDialCode)||a.__sfCountryOptions?.[0]||g[0]||null}function le(e){const{input:a,toggle:s}=N(e);if(!a)return;const t=e.classList.contains("disabled"),n=L(a.disabled,!1),o=t||n;e.classList.toggle("disabled",o),s&&(s.setAttribute("aria-disabled",o?"true":"false"),s.tabIndex=o?-1:0),o&&V(e,!1),M(e)}function re(e,a){if(!a?.showCode)return"";const s=String(e?.dataset?.dialCode||"").trim();return s?`${s} `:""}function me(e,a,s){if(!a)return;const t=re(e,s);if(!t)return;const n=String(a.value||"");if(n.startsWith(t))return;const o=K(n,e?.dataset?.dialCode||"");a.value=`${t}${o}`.trimEnd()}function de(e,a){if(!e||!a)return;const s=e.selectionStart??0,t=e.selectionEnd??0;if(s>=a.length&&t>=a.length)return;const n=a.length;e.setSelectionRange(n,n)}function fe(e,a,s="runtime"){if(!e||!a)return;const{input:t,leftFlag:n}=N(e);if(!t)return;const o=e.__sfCountryConfig||W(e,t),i=e.dataset.dialCode||"";e.dataset.iso2=a.iso2,e.dataset.dialCode=a.dialCode,e.dataset.maskPattern=a.maskPattern||"";const l=w.get(e);if(l&&(l.selected=e.dataset.maskPattern),e.__sfCountrySelected=a,o.showCode&&n){const e=F(a,o,!1),s=e.querySelector("img");n.textContent="",s?n.append(s):n.textContent=e.textContent||""}if("item"===s||"state"===s){const s=K(t.value,i);oe(e,t,"",o);const n=a.dialCode?`${a.dialCode} `:"";t.value=`${n}${s}`.trim(),t.dispatchEvent(new Event("input",{bubbles:!0})),t.dispatchEvent(new Event("change",{bubbles:!0}))}if(o.useMask){oe(e,t,q(o.useCountryMasks?a.maskPattern:o.fixedMaskPattern||a.maskPattern,o.maskStyle),o)}else oe(e,t,"",o);M(e),S(e,t)}function ue(e,{resetCountry:a=!1,countries:s,maskPattern:t}={}){if((0,f.vl)(e,"sf-country-code"),e?.__sfCountryCodeBind&&e.__sfCountryCodeBind!==ue)return e.__sfCountryCodeBind(e,{resetCountry:a,countries:s,maskPattern:t});if(!e||"function"==typeof e.__sfCountryCodeInput)return;const{input:n,toggle:o,leftFlag:i}=N(e);if(!n)return;e.__sfCountryCodeBind=ue,e.__sfCountryCodeSetState=ke;const l=W(e,n),m=w.get(e),d=void 0!==t?String(t).trim():m&&l.fixedMaskPattern===m.selected?m.fixed:l.fixedMaskPattern;l.fixedMaskPattern=d,w.set(e,{fixed:d,selected:e.dataset.maskPattern}),e.__sfCountryConfig=l,ee(e,l),se(e,8);const u=N(e),c=u.items;if(te(e),e.__sfCountryOptions=void 0===s?c.map(e=>Y(e,l.locale)):J(s,l.locale,l.maxItems),!l.showCode&&o?o.classList.add("hidden"):o&&o.classList.remove("hidden"),l.multiCountry)e.classList.remove("sf-country-code--fixed-dial-code"),u.list?.classList?.remove("hidden");else{e.classList.add("sf-country-code--fixed-dial-code"),e.classList.remove("open"),u.list?.classList?.add("hidden");const a=o?.querySelector?.(".sf-icon");a&&a.remove()}const h=ie(l,e);!a&&b.has(n)||b.set(n,h),h?fe(e,h,"init"):i&&(i.textContent="");const k=a=>{if(a.preventDefault(),!l.multiCountry||n.disabled||e.classList.contains("disabled"))return;const s=!e.classList.contains("open");U(e),V(e,s),s&&ae(e)},y=a=>{a.altKey||a.ctrlKey||a.metaKey||n.disabled||e.classList.contains("disabled")||!l.multiCountry||("Enter"!==a.key&&" "!==a.key||(a.preventDefault(),k(a),e.classList.contains("open")&&P()),"ArrowDown"!==a.key&&"ArrowUp"!==a.key||(a.preventDefault(),e.classList.contains("open")||k(a),P("ArrowUp"===a.key?-1:void 0)),"Escape"===a.key&&V(e,!1))},p=a=>{e.contains(a.target)||V(e,!1)},g=a=>{if(a.preventDefault(),n.disabled||e.classList.contains("disabled")||!l.multiCountry)return;const s=a.currentTarget;if("true"===s.getAttribute("aria-disabled")||s.classList.contains("disabled"))return;const t=Y(s,l.locale);t&&(fe(e,t,"item"),V(e,!1),("keydown"===a.type?o:n)?.focus({preventScroll:!0}))},E=()=>c.filter(e=>"true"!==e.getAttribute("aria-disabled")&&!e.classList.contains("disabled")&&!e.hidden),P=e=>{const a=E(),s=a.findIndex(e=>"true"===e.getAttribute("aria-selected")),t=void 0===e?Math.max(0,s):e<0?a.length-1:Math.min(e,a.length-1);c.forEach(e=>{e.tabIndex=-1});const n=a[t];if(!n)return;n.tabIndex=0,n.focus({preventScroll:!0});const o=u.itemsWrap;if(o){const e=o.getBoundingClientRect(),a=n.getBoundingClientRect();a.top<e.top?o.scrollTo({top:o.scrollTop-(e.top-a.top),behavior:"instant"}):a.bottom>e.bottom&&o.scrollTo({top:o.scrollTop+(a.bottom-e.bottom),behavior:"instant"})}};let C="",R=0;const j=a=>{if(a.altKey||a.ctrlKey||a.metaKey||n.disabled||e.classList.contains("disabled"))return;const s=E(),t=s.indexOf(a.currentTarget);if("Escape"===a.key)return a.preventDefault(),V(e,!1),void o?.focus({preventScroll:!0});if("Enter"!==a.key&&" "!==a.key){if(["ArrowDown","ArrowUp","Home","End"].includes(a.key)){a.preventDefault();const e="Home"===a.key?0:"End"===a.key?s.length-1:Math.max(0,t+("ArrowDown"===a.key?1:-1));return void P(e)}if(1===a.key.length){const e=performance.now();C=e-R>700?a.key:C+a.key,R=e;const n=[...C].every(e=>e===C[0])?C[0]:C,o=[...s.slice(t+1),...s.slice(0,t+1)].find(e=>(e.querySelector("span")?.textContent||e.textContent).trim().toLocaleLowerCase().startsWith(n.toLocaleLowerCase()));o&&(a.preventDefault(),P(s.indexOf(o)))}}else g(a)},_=a=>{e.contains(a.relatedTarget)||V(e,!1)},v=()=>{me(e,n,l),de(n,re(e,l)),S(e,n)},M=()=>{requestAnimationFrame(()=>{me(e,n,l),de(n,re(e,l))})},L=a=>{const s=re(e,l);if(!s)return;if(!["Backspace","Delete"].includes(a.key))return;const t=n.selectionStart??0,o=n.selectionEnd??t;return"Backspace"===a.key&&t<=s.length||"Delete"===a.key&&t<s.length?(a.preventDefault(),void de(n,s)):void((t<s.length||o<s.length)&&(a.preventDefault(),de(n,s)))};o&&(o.addEventListener("click",k),o.addEventListener("keydown",y),o.setAttribute("role","button")),n.addEventListener("input",v),n.addEventListener("paste",M),n.addEventListener("keydown",L),c.forEach(e=>{e.addEventListener("click",g),e.addEventListener("keydown",j)}),e.addEventListener("focusout",_),document.addEventListener("click",p),e.__sfCountryCodeToggleClick=k,e.__sfCountryCodeToggleKeydown=y,e.__sfCountryCodeDocClick=p,e.__sfCountryCodeItemClick=g,e.__sfCountryCodeItemKeydown=j,e.__sfCountryCodeFocusOut=_,e.__sfCountryCodeInput=v,e.__sfCountryCodePaste=M,e.__sfCountryCodeInputKeydown=L,e.__sfCountryReleaseReset=(0,r.z)(n,()=>{const a=b.get(n);a&&fe(e,a,"reset"),V(e,!1),S(e,n)}),e.__sfCountryRequiredObserver=new MutationObserver(()=>{S(e,n),x(e,n)}),e.__sfCountryRequiredObserver.observe(e,{attributes:!0,attributeFilter:["required","aria-label","aria-labelledby","aria-describedby","id"],childList:!0,characterData:!0,subtree:!0}),e.dataset[H]="1",le(e),e.__sfCountryViewport?.(e.classList.contains("open"))}function ce(e){if(!e||"function"!=typeof e.__sfCountryCodeInput)return;const{input:a,toggle:s,items:t}=N(e);e.__sfCountryReleaseReset?.(),delete e.__sfCountryReleaseReset,e.__sfCountryRequiredObserver?.disconnect(),delete e.__sfCountryRequiredObserver,e.__sfCountryViewport?.(!1),delete e.__sfCountryViewport,e.querySelectorAll("img[data-flag-src]").forEach(e=>E?.unobserve(e)),s&&e.__sfCountryCodeToggleClick&&s.removeEventListener("click",e.__sfCountryCodeToggleClick),s&&e.__sfCountryCodeToggleKeydown&&s.removeEventListener("keydown",e.__sfCountryCodeToggleKeydown),e.__sfCountryCodeDocClick&&document.removeEventListener("click",e.__sfCountryCodeDocClick),t.forEach(a=>{e.__sfCountryCodeItemKeydown&&a.removeEventListener("keydown",e.__sfCountryCodeItemKeydown),e.__sfCountryCodeItemClick&&a.removeEventListener("click",e.__sfCountryCodeItemClick)}),e.__sfCountryCodeFocusOut&&e.removeEventListener("focusout",e.__sfCountryCodeFocusOut),a&&e.__sfCountryCodeInput&&a.removeEventListener("input",e.__sfCountryCodeInput),a&&e.__sfCountryCodePaste&&a.removeEventListener("paste",e.__sfCountryCodePaste),a&&e.__sfCountryCodeInputKeydown&&a.removeEventListener("keydown",e.__sfCountryCodeInputKeydown),e.__sfCountryMask&&window.SF?.Mask?.destroy?.(e.__sfCountryMask),delete e.__sfCountryCodeToggleClick,delete e.__sfCountryCodeToggleKeydown,delete e.__sfCountryCodeDocClick,delete e.__sfCountryCodeItemClick,delete e.__sfCountryCodeItemKeydown,delete e.__sfCountryCodeFocusOut,delete e.__sfCountryCodeInput,delete e.__sfCountryCodePaste,delete e.__sfCountryCodeInputKeydown,delete e.__sfCountryMask,delete e.__sfCountryMaskToken,delete e.__sfCountrySelected,delete e.__sfCountryConfig,delete e.__sfCountryOptions,delete e.dataset[H]}function he(e=document){e.querySelectorAll(p).forEach(e=>{e.closest("sf-country-code")||ue(e)})}function ke(e,a={}){const s=e instanceof HTMLElement?e.closest(p)||e:null;if(!s)return!1;if(s.__sfCountryCodeSetState&&s.__sfCountryCodeSetState!==ke)return s.__sfCountryCodeSetState(s,a);const{input:t}=N(s);if(!t)return!1;if(Object.prototype.hasOwnProperty.call(a,"disabled")){const e=L(a.disabled,!1);t.disabled=e,s.classList.toggle("disabled",e),le(s)}if(Object.prototype.hasOwnProperty.call(a,"active")&&V(s,L(a.active,!1)),Object.prototype.hasOwnProperty.call(a,"open")&&V(s,L(a.open,!1)),Object.prototype.hasOwnProperty.call(a,"value")&&(t.value=String(a.value??""),t.dispatchEvent(new Event("input",{bubbles:!0})),t.dispatchEvent(new Event("change",{bubbles:!0}))),Object.prototype.hasOwnProperty.call(a,"iso2")){const e=X(s,a.iso2);e&&fe(s,e,"state")}if(Object.prototype.hasOwnProperty.call(a,"dialCode")){const e=X(s,"",a.dialCode);e&&fe(s,e,"state")}return!0}class ye extends n.y{static componentName="CountryCode";html=null;constructor(e){super(e);const{size:a="1",label:s="",required:t=!1,name:n="",form:o="",hint:i="",value:l="",placeholder:r="+7(___)___-__-__",disabled:m=!1,active:d=!1,open:u=d,countries:c=[],locale:h="ru",useMask:k=!1,useCountryMasks:y=!0,showCode:p=!0,maskStyle:H="native",multiCountry:g=!0,iso2:E="",dialCode:P="",maskPattern:C="",flagBase:b="",lazyFlags:R=!0,showMaskPlaceholder:j=!1,maskPlaceholderChar:w="_",maxItems:x=0}=this.params||{},S=this.attrs.class||this.attrs.className;this.template=document.createElement("label"),this.id&&(this.template.id=this.id),this.template.classList.add("sf-country-code",`sf-country-code--size-${(0,f.id)(a,"sf-country-code")}`),L(m)&&this.template.classList.add("disabled"),L(u)&&this.template.classList.add("open"),S&&this.template.classList.add(...`${S}`.split(" ").filter(Boolean)),this.template.dataset.locale=String(h),this.template.dataset.useMask=String(L(k,!1)),this.template.dataset.useCountryMasks=String(L(y,!0)),this.template.dataset.showCode=String(L(p,!0)),this.template.dataset.maskStyle="brackets"===String(H).toLowerCase()?"brackets":"native",this.template.dataset.multiCountry=String(L(g,!0)),this.template.dataset.lazyFlags=String(L(R,!0)),this.template.dataset.showMaskPlaceholder=String(L(j,!1)),this.template.dataset.maskPlaceholderChar=String(w||"_"),E&&(this.template.dataset.iso2=A(E)),P&&(this.template.dataset.dialCode=String(P)),C&&(this.template.dataset.maskPattern=String(C)),b&&(this.template.dataset.flagBase=String(b).replace(/\/$/,"")),Number(x)>0&&(this.template.dataset.maxItems=String(Number(x)));const _=document.createElement("span");_.classList.add("sf-country-code-label");const v=document.createElement("span");if(v.classList.add("sf-country-code-text"),v.textContent=String(s),_.append(v),L(t,!1)){const e=document.createElement("span");e.classList.add("sf-country-code-required"),e.textContent="*",_.append(e)}const M=document.createElement("span");M.classList.add("sf-country-code-field");const I=document.createElement("span");I.classList.add("sf-country-code-left");const B=document.createElement("div");B.classList.add("sf-country-code-flag-icon"),B.setAttribute("aria-hidden","true");const $=document.createElement("i");$.classList.add("sf-icon"),$.textContent=L(u)?"expand_less":"expand_more",I.append(B,$);const N=document.createElement("input");N.type="tel",N.name=String(n),o&&N.setAttribute("form",String(o)),N.required=L(t,!1),N.defaultValue=String(l??""),N.placeholder=String(r??""),N.disabled=L(m,!1),M.append(I,N),this.template.append(_,M);const O=J(c,h,x);if(O.length){const e=document.createElement("span");e.classList.add("sf-country-code-list");const a=document.createElement("span");a.classList.add("sf-country-code-items","flex","flex-col"),O.forEach(e=>{const s=document.createElement("span");s.classList.add("sf-country-code-item"),e?.iso2&&(s.dataset.iso2=A(e.iso2)),(e?.dialCode||e?.code)&&(s.dataset.code=String(e.dialCode||e.code)),void 0!==e?.maskPattern&&(s.dataset.maskPattern=String(e.maskPattern||""));const t=F({iso2:e?.iso2,flagEmoji:e?.flagEmoji||""},{flagBase:this.template.dataset.flagBase||T(),lazyFlags:L(this.template.dataset.lazyFlags,!0)},!0),n=document.createElement("span");if(e?.label)n.textContent=String(e.label);else{const a=e?.nameRu||e?.nameEn||e?.dialCode||"",s=e?.dialCode||e?.code||"";n.textContent=s?`${a} (${s})`:a}s.append(t,n),this.applyLayoutUtilities(s,".sf-country-code .sf-country-code-item"),this.applyLayoutUtilities(t,".sf-country-code .sf-country-code-flag"),a.append(s)}),e.append(a),this.template.append(e)}if(i){const e=document.createElement("span");e.classList.add("sf-country-code-hint"),e.textContent=String(i),this.template.append(e)}this.applyLayoutUtilities(this.template,".sf-country-code"),this.applyLayoutUtilities(_,".sf-country-code .sf-country-code-label"),this.applyLayoutUtilities(M,".sf-country-code .sf-country-code-field"),this.applyLayoutUtilities(I,".sf-country-code .sf-country-code-left"),this.applyLayoutUtilities(N,".sf-country-code .sf-country-code-field input"),this.applyLayoutUtilities(B,".sf-country-code .sf-country-code-flag-icon")}init(){ue(this.template,{maskPattern:this.params?.maskPattern||""})}destroyInternal(){ce(this.template)}}ye.utilityMap=i,(0,o.A)("CountryCode",ye),"undefined"!=typeof window&&(window.SF=window.SF||{},window.SF.CountryCode=window.SF.CountryCode||{},window.SF.CountryCode.setState=ke),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>he()):he();new MutationObserver(e=>{e.forEach(e=>{e.removedNodes.forEach(e=>{if(!(e instanceof Element))return;const a=[...e.querySelectorAll(p)];e.matches(p)&&a.unshift(e);for(const e of a)e.isConnected||e.closest("sf-country-code")||ce(e)}),e.addedNodes.forEach(e=>{e instanceof Element&&(e.matches?.(p)&&!e.closest("sf-country-code")&&ue(e),he(e))})})}).observe(document.documentElement,{childList:!0,subtree:!0}),t()}catch(pe){t(pe)}})},"98e26702f55a"(e,a,s){function t(){const e=globalThis.SF=globalThis.SF||{};return e.__deprecationNotes instanceof Map||Object.defineProperty(e,"__deprecationNotes",{value:new Map,configurable:!0}),e.__deprecationNotes}function n({component:e="",kind:a="attribute",attribute:s="",from:n,to:o=null}={}){if(!n)return;const i=[e,a,s,n].join("|"),l=t(),r=l.get(i);if(r)r.count+=1;else if(l.set(i,{component:e,kind:a,attribute:s,from:n,to:o,count:1}),function(){const e=globalThis.document?.documentElement;return"warn"===e?.dataset?.sfDeprecations||!0===globalThis.SF?.deprecations?.warn}()){const t=e?`${e}: `:"",i="value"===a?`${s}="${n}"`:`${a} ${n}`;globalThis.console?.warn?.(`[SIMAI Framework] ${t}${i} is a legacy name${o?`; write ${o}`:""}. See contracts/changes/journal.json.`)}}if(s.d(a,{id:()=>r,vl:()=>m}),"undefined"!=typeof globalThis){globalThis.SF=globalThis.SF||{};const e=globalThis.SF.deprecations||{};e.list=function(){return[...t().values()].map(e=>({...e}))},e.clear=function(){t().clear()},e.note=n,globalThis.SF.deprecations=e}const o=Object.freeze(["1/2","1","2"]),i=Object.freeze({"1/3":"1/2",3:"2"}),l=new Set;function r(e,a="field",s="1"){const t=String(e??"").trim().toLowerCase();if(o.includes(t))return t;if(Object.hasOwn(i,t)){const e=i[t];n({component:a,kind:"value",attribute:"size",from:t,to:e});const s=`${a}:${t}`;return l.has(s)||"undefined"==typeof console||(l.add(s),console.warn(`[SIMAI Framework] ${a}: size ${t} is retired for form fields; rendering size ${e}.`)),e}return s}function m(e,a){if(e?.classList)for(const[s,t]of Object.entries(i)){const t=`${a}--size-${s}`;e.classList.contains(t)&&e.classList.replace(t,`${a}--size-${r(s,a)}`)}}},"67eed2647f47"(e,a,s){s.d(a,{z:()=>o});const t=new WeakMap,n=new WeakSet;function o(e,a){const s=e.ownerDocument;n.has(s)||(s.addEventListener("reset",e=>{const a=e.target;if("FORM"!==a?.tagName)return;const s=Array.from(a.elements);setTimeout(()=>{if(!e.defaultPrevented)for(const e of s)if(e.isConnected&&e.form===a)for(const a of t.get(e)||[])a()},0)},!0),n.add(s));let o=t.get(e);return o||t.set(e,o=new Set),o.add(a),()=>o.delete(a)}},"0ab12d47912a"(e,a,s){s.d(a,{y:()=>n});let t=null;function n(){const e=()=>window.SF?.Mask?.create?window.SF.Mask:null,a=e();return a?Promise.resolve(a):t||(t=new Promise(a=>{const s=[[window,"sf-mask-ready"],[window,"sf-loader-ready"],[window,"load"],[document,"DOMContentLoaded"]],n=()=>{const o=e();o&&(s.forEach(([e,a])=>e.removeEventListener(a,n)),t=null,a(o))};s.forEach(([e,a])=>e.addEventListener(a,n))}),t)}},"58661bec99a6"(e,a,s){const t=function(e,a){if(e&&a)if("undefined"==typeof window||"function"!=typeof window.registerSfComponent){if("undefined"!=typeof window&&window.SF?.Loader?.registerComponent)window.SF.Loader.registerComponent(e,a);else if("undefined"!=typeof window){(window.SF_PENDING_COMPONENTS=window.SF_PENDING_COMPONENTS||[]).push([e,a])}}else window.registerSfComponent(e,a)};s.d(a,["A",0,t])},d7f974466839(e,a,s){s.d(a,{y:()=>t});class t{lifecycleName(){return this.componentName??this.constructor.componentName}constructor(e){this.props=e,this.id=e?.id,this.params=e?.param,this.attrs=e?.attrs||{},this.template=null,window.dispatchEvent(new CustomEvent(`${this.lifecycleName()}:beforeRender`,{detail:this}))}getUtilityMap(){return this.constructor.utilityMap||null}extractUtilityClasses(e){if(!Array.isArray(e))return[];const a=new Set;return e.forEach(e=>{if("string"!=typeof e)return;const s=e.match(/\(([^)]+)\)/g);s&&s.forEach(e=>{e.slice(1,-1).split(/\s+/).filter(Boolean).forEach(e=>{e.startsWith(".")&&e.length>1&&a.add(e.slice(1))})})}),Array.from(a)}applyLayoutUtilities(e,a){if(!e||!a)return;const s=this.getUtilityMap();if(!s||!s[a])return;this.extractUtilityClasses(s[a]).forEach(a=>e.classList.add(a))}render(){return this.html=this.template,"function"==typeof this.init&&this.init(),this.html&&window.dispatchEvent(new CustomEvent(`${this.lifecycleName()}:render`,{detail:this})),this.html}destroy(){this.destroyInternal?.(),this.props=null,this.id=null,this.params=null,this.template=null,this.html&&(this.html.remove(),this.html=null),window.dispatchEvent(new CustomEvent(`${this.lifecycleName()}:destroy`,{detail:this}))}destroyInternal(){}}},"2a25b3f4fc15"(e,a,s){s.a(e,async(e,a)=>{try{var t=s("c614c5e30b0d"),n=s("0d662e4d7d63"),o=s("c0450586011d"),i=s("fbe0570fcc69"),l=s("98e26702f55a"),r=s("788779012d8a"),m=e([n,o,i,r]);[n,o,i,r]=m.then?(await m)():m;var d=s.n(i);const f=".sf-country-code",u=Array.isArray(t?.items)?t.items:[];class c extends(d()){static get props(){return{size:{default:"1"},label:{default:""},ariaLabel:{attribute:"aria-label",default:""},required:{type:Boolean,default:!1},name:{default:""},form:{default:""},hint:{default:""},value:{default:""},placeholder:{default:"+7(___)___-__-__"},disabled:{type:Boolean,default:!1},open:{type:Boolean,default:!1},locale:{default:""},useMask:{type:Boolean,default:!1},useCountryMasks:{type:Boolean,default:!0},showCode:{type:Boolean,default:!0},maskStyle:{default:"native"},multiCountry:{type:Boolean,default:!0},iso2:{default:""},dialCode:{default:""},maskPattern:{default:""},flagBase:{default:""},lazyFlags:{type:Boolean,default:!0},showMaskPlaceholder:{type:Boolean,default:!1},maskPlaceholderChar:{default:"_"},maxItems:{type:Number,default:0}}}constructor(){super(),this._countries=null,this._boundRoot=null,this._renderAttributes=new Set}get size(){return(0,l.id)(this.getAttribute("size")||"1","sf-country-code")}get label(){return this.getAttribute("label")||""}get ariaLabel(){return this.getProp("ariaLabel")||""}get required(){return this.getBooleanAttr("required",!1)}get hint(){return this.getAttribute("hint")||""}get value(){return this.getAttribute("value")||""}get placeholder(){return this.getAttribute("placeholder")||"+7(___)___-__-__"}get disabled(){return this.getBooleanAttr("disabled",!1)}get open(){return this.getBooleanAttr("open",!1)||this.getBooleanAttr("active",!1)}get locale(){return"ru"===String(this.getAttribute("locale")||(0,n.pageLanguage)(this)).toLowerCase()?"ru":"en"}get useMask(){return this.getBooleanAttr("use-mask",!1)}get useCountryMasks(){return this.getBooleanAttr("use-country-masks",!0)}get showCode(){return this.getBooleanAttr("show-code",!0)}get maskStyle(){return"brackets"===String(this.getAttribute("mask-style")||"native").toLowerCase()?"brackets":"native"}get multiCountry(){return this.getBooleanAttr("multi-country",!0)}get iso2(){return(0,o.Xx)(this.getAttribute("iso2"))}get dialCode(){return String(this.getAttribute("dial-code")||"").trim()}get maskPattern(){return String(this.getAttribute("mask-pattern")||"").trim()}get flagBase(){return String(this.getAttribute("flag-base")||"").trim()||(0,o.Dk)()}get lazyFlags(){return this.getBooleanAttr("lazy-flags",!0)}get showMaskPlaceholder(){return this.getBooleanAttr("show-mask-placeholder",!1)}get maskPlaceholderChar(){return String(this.getAttribute("mask-placeholder-char")||"_")}get maxItems(){return Math.trunc(this.getNumberAttr("max-items",0))}get countries(){return(0,o.Ue)(this._countries,this.locale,this.maxItems)}set countries(e){this._countries=Array.isArray(e)?e:null,this.requestComponentUpdate("countries")}templateContext(){const e=this.getPropsContext(),a=this._boundRoot,s=a&&!this._renderAttributes.has("open")&&!this._renderAttributes.has("active"),t=a&&!this._renderAttributes.has("disabled");return this.createTemplateContext({...e,open:s?a.classList.contains("open"):this.open,disabled:t?!!a.querySelector("input")?.disabled||a.classList.contains("disabled"):this.disabled,countries:this.countries.length?this.countries:(0,o.Ue)(u,this.locale,this.maxItems),locale:this.locale,maskStyle:this.maskStyle,iso2:this.iso2,flagBase:this.flagBase,maxItems:this.maxItems})}onDisconnected(){this._boundRoot&&((0,o._i)(this._boundRoot),this._boundRoot=null)}beforeRender(e=[]){this._renderAttributes=new Set(e)}afterRender(e){if("function"==typeof e)return super.afterRender(e);this._boundRoot&&((0,o._i)(this._boundRoot),this._boundRoot=null),this._boundRoot=this.querySelector(f),this._boundRoot&&(0,o.nD)(this._boundRoot,{resetCountry:this._renderAttributes.has("iso2")||this._renderAttributes.has("dial-code"),countries:this.countries,maskPattern:this.maskPattern})}template(){return(0,r.o)(this.templateContext())}get state(){const e=this.querySelector(f),a=e?.querySelector?.(".sf-country-code-field input")||null;return{value:a?.value||"",iso2:e?.dataset?.iso2||"",dialCode:e?.dataset?.dialCode||"",open:e?.classList?.contains("open")||!1,disabled:e?.classList?.contains("disabled")||!1}}setState(e={}){const a=this.querySelector(f);return(0,o.nK)(a,e)}}c.define("sf-country-code"),a()}catch(e){a(e)}})},"788779012d8a"(e,a,s){s.a(e,async(e,t)=>{try{s.d(a,{o:()=>r});var n=s("ddf1cdb42ecc"),o=e([n]),i=o.then?(await o)():o;n=i[0];function l(e,a=""){const s=String(e?.iso2||"").trim().toLowerCase(),t=e?.flagEmoji||"",o=s&&a?`${a}/${s}.svg`:"";return o?n.html`
2
2
  <img
3
3
  alt=${e?.iso2?`${e.iso2} flag`:"flag"}
4
4
  decoding="async"
@@ -6,9 +6,9 @@
6
6
  data-flag-src=${o}
7
7
  data-flag-fallback=${t}
8
8
  />
9
- `:n.html`${t}`}function r(e){const{size:a,label:s,required:t,hint:o,value:i,placeholder:r,disabled:m,open:d,countries:f,locale:u,multiCountry:c,showCode:h,maskStyle:k,useMask:y,useCountryMasks:p,iso2:H,dialCode:g,maskPattern:E,flagBase:P,lazyFlags:C,showMaskPlaceholder:b,maskPlaceholderChar:R,maxItems:j}=e,w=["sf-country-code",`sf-country-code--size-${a}`,"flex","flex-col"];return e.rootClass&&w.push(e.rootClass),m&&w.push("disabled"),d&&w.push("open"),n.html`
9
+ `:n.html`${t}`}function r(e){const{size:a,label:s,required:t,hint:o,value:i,placeholder:r,disabled:m,open:d,countries:f,locale:u,multiCountry:c,showCode:h,maskStyle:k,useMask:y,useCountryMasks:p,iso2:H,dialCode:g,maskPattern:E,flagBase:P,lazyFlags:C,showMaskPlaceholder:b,maskPlaceholderChar:R,maxItems:j,ariaLabel:w}=e,x=["sf-country-code",`sf-country-code--size-${a}`,"flex","flex-col"];return e.rootClass&&x.push(e.rootClass),m&&x.push("disabled"),d&&x.push("open"),n.html`
10
10
  <label
11
- class=${w.join(" ")}
11
+ class=${x.join(" ")}
12
12
  style=${e.rootStyle||n.nothing}
13
13
  data-locale=${u}
14
14
  data-use-mask=${String(y)}
@@ -25,10 +25,11 @@
25
25
  data-flag-base=${P||""}
26
26
  data-max-items=${String(j||0)}
27
27
  >
28
- <span class="sf-country-code-label flex">
29
- <span class="sf-country-code-text">${s}</span>
30
- ${t?n.html`<span class="sf-country-code-required">*</span>`:""}
31
- </span>
28
+ ${s?n.html`
29
+ <span class="sf-country-code-label flex">
30
+ <span class="sf-country-code-text">${s}</span>
31
+ ${t?n.html`<span class="sf-country-code-required">*</span>`:""}
32
+ </span>`:""}
32
33
 
33
34
  <span class="sf-country-code-field transition flex items-center">
34
35
  <span class="sf-country-code-left flex items-center">
@@ -44,6 +45,7 @@
44
45
  .value=${i}
45
46
  placeholder=${r}
46
47
  ?disabled=${m}
48
+ aria-label=${!s&&w?w:n.nothing}
47
49
  />
48
50
  </span>
49
51
 
@@ -131,6 +131,11 @@
131
131
  "max-items": {
132
132
  "type": "number",
133
133
  "default": 0
134
+ },
135
+ "aria-label": {
136
+ "type": "string",
137
+ "default": "",
138
+ "description": "Accessible name for a telephone field rendered without a visible label."
134
139
  }
135
140
  },
136
141
  "additionalProperties": false
@@ -267,7 +272,7 @@
267
272
  "source_artifacts": [
268
273
  {
269
274
  "path": "src/smart/country-code/index.js",
270
- "sha256": "be531da05549bed63027e3cb619ac38582a01a3bb89e73db775b894a11d073b7"
275
+ "sha256": "114df966ab51fd15fbee2e47b4eccb8ff1628e467b8621e675895210b3ba0612"
271
276
  }
272
277
  ],
273
278
  "generated_runtime": [
@@ -45,6 +45,7 @@ export function renderCountryCodeTemplate(context) {
45
45
  showMaskPlaceholder,
46
46
  maskPlaceholderChar,
47
47
  maxItems,
48
+ ariaLabel,
48
49
  } = context;
49
50
 
50
51
  const rootClasses = ['sf-country-code', `sf-country-code--size-${size}`, 'flex', 'flex-col'];
@@ -71,10 +72,16 @@ export function renderCountryCodeTemplate(context) {
71
72
  data-flag-base=${flagBase || ''}
72
73
  data-max-items=${String(maxItems || 0)}
73
74
  >
74
- <span class="sf-country-code-label flex">
75
- <span class="sf-country-code-text">${label}</span>
76
- ${required ? html`<span class="sf-country-code-required">*</span>` : ''}
77
- </span>
75
+ ${label
76
+ // No label, no label row: a lone star over a control names nothing, and
77
+ // the row left an empty line above every phone field in a panel that
78
+ // draws the labels itself.
79
+ ? html`
80
+ <span class="sf-country-code-label flex">
81
+ <span class="sf-country-code-text">${label}</span>
82
+ ${required ? html`<span class="sf-country-code-required">*</span>` : ''}
83
+ </span>`
84
+ : ''}
78
85
 
79
86
  <span class="sf-country-code-field transition flex items-center">
80
87
  <span class="sf-country-code-left flex items-center">
@@ -92,6 +99,7 @@ export function renderCountryCodeTemplate(context) {
92
99
  .value=${value}
93
100
  placeholder=${placeholder}
94
101
  ?disabled=${disabled}
102
+ aria-label=${!label && ariaLabel ? ariaLabel : nothing}
95
103
  />
96
104
  </span>
97
105