PageSourceSearch

https://www.hering.com.br/_next/static/chunks/7270.2404cfe65480de1a.js

js hering.com.br collected 2026-09-24 09:07:25 UTC 12,848 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7270],{93783:function(e,a,r){"use strict";r.d(a,{d:function(){return t}});var t=r(9377).gl},69645:function(e,a,r){"use strict";r(27378);var t=r(41997),n=r.n(t),o=r(24246);a.Z=e=>{var{size:a=16,color:r="currentColor",trackColor:t="var(--color-neutral-300)",thickness:s=1.5,className:l}=e;return(0,o.jsx)("span",{className:"".concat(n().spinner).concat(l?" ".concat(l):""),"aria-hidden":"true",style:{width:a,height:a,borderColor:t,borderTopColor:r,borderWidth:s}})}},65597:function(e,a,r){"use strict";r.d(a,{Z:function(){return dropdown}});var t=r(90849),n=r(27378),o=r(37047),s=r.n(o),l=r(24246),variants_ShadowFocus=e=>{var{variant:a,isOpen:r,contentRef:t,contentChanged:o,maxHeight:c,children:i,Trigger:u,onClose:d}=e;return(0,n.useEffect)(()=>{if(r&&d){var handleKeyDown=e=>{"Escape"===e.key&&d()};return window.addEventListener("keydown",handleKeyDown),()=>{window.removeEventListener("keydown",handleKeyDown)}}},[r,d]),(0,l.jsxs)("div",{className:s().shadowFocusDropDownContainer,children:[u&&(0,l.jsx)("div",{className:s().triggerContainer,children:u}),r&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:s().shadowFocusOverlay,"data-shadow-focus-overlay":"true","data-shadow-focus-opened":r,onClick:()=>{d&&d()}}),(0,l.jsx)("div",{className:s().shadowFocusPanel,"data-custom-dropdown-variant":a,"data-custom-dropdown-opened":r,onClick:e=>{e.stopPropagation()},children:(0,l.jsx)("div",{ref:t,"data-custom-dropdown-content":"true","data-custom-dropdown-content-opened":r,"data-custom-dropdown-content-changed":o,style:{maxHeight:c},children:i})})]})]})},c=r(69647),i=r.n(c),Default=e=>{var{variant:a,isOpen:r,contentRef:t,contentChanged:n,maxHeight:o,children:s}=e;return(0,l.jsx)("div",{className:i().dropdownContainer,"data-custom-dropdown-variant":a,"data-custom-dropdown-opened":r,children:(0,l.jsx)("div",{ref:t,"data-custom-dropdown-content":"true","data-custom-dropdown-content-opened":r,"data-custom-dropdown-content-changed":n,style:{maxHeight:o},children:s})})},u=r(5106),d=r(69645),p=r(63424),h=r(55732),_=r(97818);function normalizeSearchText(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase()}function useSearchableDropdown(e){var a,{options:r,initQuantity:t=5,showAll:o=!1,onSearch:s,onChange:l,value:c,defaultValue:i,disabled:u=!1,loading:d=!1}=e,p=(0,n.useRef)(null),v=(0,n.useRef)(null),m=(0,n.useRef)(null),w=(0,n.useRef)(null),f=(0,n.useRef)(0),{isOpened:x,open:y,close:b}=(0,_.O)(),g=void 0!==c,{0:j,1:k}=(0,n.useState)(null!=i?i:""),D=g?c:j,{0:C,1:N}=(0,n.useState)(""),{0:S,1:O}
1=(0,n.useState)(r),{0:Z,1:F}=(0,n.useState)(!1),{0:I,1:E}=(0,n.useState)(-1),R=null!==(a=S.find(e=>e.value===D))&&void 0!==a?a:r.find(e=>e.value===D),P=!!(D&&R);(0,n.useEffect)(()=>{C||O(r)},[r,C]);var M=o?S:S.slice(0,t),T=(0,n.useCallback)(()=>{b(),N(""),E(-1),w.current&&clearTimeout(w.current),O(r),F(!1)},[b,r]),z=(0,n.useCallback)(()=>{u||d||(y(),N(""),O(r),requestAnimationFrame(()=>{var e;return null===(e=v.current)||void 0===e?void 0:e.focus()}))},[u,d,y,r]),L=(0,n.useCallback)(e=>{g||k(e.value),null==l||l(e),b(),N(""),E(-1),w.current&&clearTimeout(w.current),O(r),F(!1)},[g,l,b,r]),A=(0,n.useCallback)(e=>{var a=e.target.value;if(N(a),E(-1),w.current&&clearTimeout(w.current),!a){O(r),F(!1);return}if(!s){var t=normalizeSearchText(a);O(r.filter(e=>normalizeSearchText(e.label).includes(t)));return}F(!0);var n=++f.current;w.current=setTimeout((0,h.Z)(function*(){try{var e=yield s(a);n===f.current&&O(e)}finally{n===f.current&&F(!1)}}),300)},[s,r]),B=(0,n.useCallback)(e=>{var a,r,t=null===(a=m.current)||void 0===a?void 0:a.querySelectorAll('[role="option"]');null==t||null===(r=t[e])||void 0===r||r.scrollIntoView({block:"nearest"})},[]),K=(0,n.useCallback)(e=>{if(x)switch(e.key){case"ArrowDown":e.preventDefault(),E(e=>{var a=Math.min(e+1,M.length-1);return B(a),a});break;case"ArrowUp":e.preventDefault(),E(e=>{var a=Math.max(e-1,0);return B(a),a});break;case"Enter":e.preventDefault(),I>=0&&M[I]&&L(M[I]);break;case"Escape":e.preventDefault(),T()}},[x,M,I,L,T,B]);return(0,n.useEffect)(()=>{var onMouseDown=e=>{p.current&&!p.current.contains(e.target)&&T()};return document.addEventListener("mousedown",onMouseDown),()=>document.removeEventListener("mousedown",onMouseDown)},[T]),(0,n.useEffect)(()=>()=>{w.current&&clearTimeout(w.current)},[]),{containerRef:p,inputRef:v,listRef:m,isOpened:x,currentValue:D,hasValue:P,selectedOption:R,inputValue:C,visibleOptions:M,isSearching:Z,focusedIndex:I,showAll:o,initQuantity:t,handleOpen:z,handleClose:T,handleSelect:L,handleInputChange:A,handleKeyDown:K,setFocusedIndex:E}}var v=r(89223),m=r.n(v),Searchable=e=>{var{placeholder:a,searchPlaceholder:r,options:t,initQuantity:n=5,showAll:o=!1,onSearch:s,onChange:c,value:i,defaultValue:h,disabled:_=!1,loading:v=!1,error:w=!1}=e,{containerRef:f,inputRef:x,listRef:y,isOpened:b,currentValue:g,hasValue:j,selectedOption:k,inputValue:D,visibleOptions:C,isSearching:N,focusedIndex:S,showAll:O,initQuantity:Z,handleOpen:F,handleClose:I,handleSelect:E,handleInputChange:R,handleKeyDown:P,setFocusedIndex:M}=useSearchableDropdown({options:t,initQuantity:n,showAll:o,onSearch:s,onChange:c,value:i,defaultValue:h,disabled:_,loading:v});return(0,l.jsxs)("div",{className:m().wrapper,ref:f,onKeyDown:P,children:[!b&&(0,l.jsxs)("button",{type:"button",className:m().trigger,onClick:F,disabled:_||v,"aria-expanded":!1,"aria-haspopup":"listbox","data-has-value":j,"data-disabled-style":_||v,"data-loading":v,"data-error":w,children:[(0,l.jsx)(p.Z,{heading:"span",text:k?k.label:a,className:m().triggerLabel,"data-has-value":j}),v?(0,l.jsx)(d.Z,{size:14,color:"var(--color-accent-700)",trackColor:"var(--color-neutral-300)"}):(0,l.jsx)("span",{className:m().chevron,"aria-hidden":"true",children:(0,l.jsx)(u.Z,{name:"caretDown"})})]}),b&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:m().inputWrap,"data-error":w,children:[(0,l.jsx)("input",{ref:x,type:"text",className:m().searchInput,value:D,onChange:R,placeholder:null!=r?r:a,"aria-expanded":!0,"aria-haspopup":"listbox","aria-autocomplete":"list",role:"combobox",autoComplete:"off"}),(0,l.jsx)("span",{className:m().iconRight,"aria-hidden":"true",children:N?(0,l.jsx)(d.Z,{size:14,color:"var(--color-accent-700)",trackColor:"var(--color-neutral-300)"}):(0,l.jsx)("button",{type:"button",className:m().closeButton,onMouseDown:e=>{e.preventDefault(),I()},"aria-label":"Fechar",tabIndex:-1,children:(0,l.jsx)(u.Z,{name:"x"})})})]}),(0,l.jsxs)("ul",{ref:y,className:m().dropdown,role:"listbox","aria-label":a,style:O?{maxHeight:"".concat(44*(Z+1),"px"),overflowY:"auto"}:void 0,children:[0===C.length&&(0,l.jsx)("li",{className:m().emptyState,role:"presentation",children:"Nenhum resultado encontrado"}),C.map((e,a)=>{var r=e.value===g,t=a===S;return(0,l.jsxs)("li",{role:"option","aria-selected":r,className:m().option,"data-selected":r,"data-focused":t,onMouseDown:a=>{a.preventDefault(),E(e)},onMouseEnter:()=>M(a),children:[(0,l.jsx)(p.Z,{heading:"span",text:e.label}),r&&(0,l.jsx)("span",{className:m().checkIcon,"aria-hidden":"true",children:(0,l.jsx)(u.Z,{name:"check"})})]},e.value)})]})]})]})}
1,w=r(62766),f=r(46264),x=r.n(f),SearchableInline=e=>{var{placeholder:a,searchPlaceholder:r,options:t,initQuantity:n=5,showAll:o=!1,onSearch:s,onChange:c,value:i,defaultValue:h,disabled:_=!1,loading:v=!1,error:m=!1,fillAvailableHeight:f=!1}=e,{containerRef:y,inputRef:b,listRef:g,isOpened:j,currentValue:k,hasValue:D,selectedOption:C,inputValue:N,visibleOptions:S,isSearching:O,focusedIndex:Z,handleOpen:F,handleClose:I,handleSelect:E,handleInputChange:R,handleKeyDown:P,setFocusedIndex:M}=useSearchableDropdown({options:t,initQuantity:n,showAll:o,onSearch:s,onChange:c,value:i,defaultValue:h,disabled:_,loading:v});return(0,l.jsxs)("div",{className:x().wrapper,ref:y,onKeyDown:P,"data-dropdown-searchable-inline":!0,"data-dropdown-searchable-inline-opened":j,"data-dropdown-fill-available-height":f,children:[!j&&(0,l.jsxs)(w.Z,{type:"button",variant:"neutral",className:x().trigger,onClick:F,disabled:_||v,"aria-expanded":!1,"aria-haspopup":"listbox","data-has-value":D,"data-disabled-style":_||v,"data-loading":v,"data-error":m,children:[(0,l.jsx)(p.Z,{heading:"span",text:C?C.label:a,className:x().triggerLabel,"data-has-value":D}),v?(0,l.jsx)(d.Z,{size:14,color:"var(--color-accent-700)",trackColor:"var(--color-neutral-300)"}):(0,l.jsx)("span",{className:x().chevron,"aria-hidden":"true",children:(0,l.jsx)(u.Z,{name:"caretDown"})})]}),j&&(0,l.jsxs)("div",{className:x().panel,children:[(0,l.jsxs)("div",{className:x().inputWrap,"data-error":m,children:[(0,l.jsx)("input",{ref:b,type:"text",className:x().searchInput,value:N,onChange:R,placeholder:null!=r?r:a,"aria-expanded":!0,"aria-haspopup":"listbox","aria-autocomplete":"list",role:"combobox",autoComplete:"off"}),(0,l.jsx)("span",{className:x().iconRight,"aria-hidden":"true",children:O?(0,l.jsx)(d.Z,{size:14,color:"var(--color-accent-700)",trackColor:"var(--color-neutral-300)"}):(0,l.jsx)(w.Z,{type:"button",variant:"neutral",className:x().closeButton,onMouseDown:e=>{e.preventDefault(),I()},"aria-label":"Fechar",tabIndex:-1,children:(0,l.jsx)(u.Z,{name:"x"})})})]}),(0,l.jsxs)("ul",{ref:g,className:x().dropdown,role:"listbox","aria-label":a,children:[0===S.length&&(0,l.jsx)("li",{className:x().emptyState,role:"presentation",children:"Nenhum resultado encontrado"}),S.map((e,a)=>{var r=e.value===k,t=a===Z;return(0,l.jsxs)("li",{role:"option","aria-selected":r,className:x().option,"data-selected":r,"data-focused":t,onMouseDown:a=>{a.preventDefault(),E(e)},onMouseEnter:()=>M(a),children:[(0,l.jsx)(p.Z,{heading:"span",text:e.label}),r&&(0,l.jsx)("span",{className:x().checkIcon,"aria-hidden":"true",children:(0,l.jsx)(u.Z,{name:"check"})})]},e.value)})]})]})]})};function ownKeys(e,a){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);a&&(t=t.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,t)}return r}function _objectSpread(e){for(var a=1;a<arguments.length;a++){var r=null!=arguments[a]?arguments[a]:{};a%2?ownKeys(Object(r),!0).forEach(function(a){(0,t.Z)(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}var dropdown=e=>{if("searchable"===e.variant)return(0,l.jsx)(Searchable,_objectSpread({},e));if("searchableInline"===e.variant)return(0,l.jsx)(SearchableInline,_objectSpread({},e));var{children:a,isOpen:r,variant:t="header",title:o,onClose:s,trigger:c}=e,{0:i,1:u}=(0,n.useState)(!1),{0:d,1:p}=(0,n.useState)("0px"),h=(0,n.useRef)(null);return((0,n.useEffect)(()=>{if(o){u(!0);var e=setTimeout(()=>u(!1),200);return()=>clearTimeout(e)}},[o]),(0,n.useEffect)(()=>{var e=h.current;if(e){if(!r){p("0px");return}p("".concat(e.scrollHeight,"px")),requestAnimationFrame(()=>{p("".concat(e.scrollHeight,"px"))})}},[a,r,o]),"shadowFocus"===t)?(0,l.jsx)(variants_ShadowFocus,{variant:t,isOpen:r,onClose:s,contentRef:h,contentChanged:i,maxHeight:d,Trigger:c,children:a}):"header"===t||r?(0,l.jsx)(Default,{variant:t,isOpen:r,contentRef:h,contentChanged:i,maxHeight:d,children:a}):(0,l.jsx)(n.Fragment,{})}},41997:function(e){e.exports={spinner:"styles_spinner__POTrX",spinnerRotate:"styles_spinnerRotate___cylB"}},69647:function(e){e.exports={dropdownContainer:"styles_dropdownContainer__zrfRA"}},89223:function(e){e.exports={wrapper:"style_wrapper__kI8ep",trigger:"style_trigger__WsXEF",searchablePulse:"style_searchablePulse__4kBnC",triggerLabel:"style_triggerLabel__Vxfby",chevron:"style_chevron__Iz7HA",inputWrap:"style_inputWrap__8S3P2",searchInput:"style_searchInput__jh5KZ",iconRight:"style_iconRight__dBiU9",closeButton:"style_closeButton__I8mU6",dropdown:"style_dropdown__DAZxS",option:"style_option__qg4zd",checkIcon:"style_checkIcon__NB3vF",emptyState:"style_emptyState__GzX5f"}},46264:function(e){e.exports={wrapper:"style_wrapper__QM4nl",trigger:"style_trigger__9E6Oj",searchableInlinePulse:"style_searchableInlinePulse__40Uej",triggerLabel:"style_triggerLabel__OmUzT",chevron:"style_chevron__vfK_o",panel:"style_panel__vuiMY",inputWrap:"style_inputWrap___loyL",searchInput:"style_searchInput__7WTF5",iconRight:"style_iconRight__niYnR",closeButton:"style_closeButton__ZhfMf",dropdown:"style_dropdown__8AtZ0",option:"style_option__WB5VA",checkIcon:"style_checkIcon__mCc2n",emptyState:"style_emptyState__bZLzS"}},37047:function(e){e.exports={shadowFocusDropDownContainer:"style_shadowFocusDropDownContainer__QwLl8",shadowFocusOverlay:"style_shadowFocusOverlay__yMQr9",triggerContainer:"style_triggerContainer__EIykg",shadowFocusPanel:"style_shadowFocusPanel__7gORs","dropdown-in":"style_dropdown-in__FbZkk",dropdownIn:"style_dropdown-in__FbZkk"}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.