PageSourceSearch

https://www.faber-castell.fr/dist/FC.Ecom/modules/ProductConfigurator-components-NibSizeFacetModal.e0c0351b.js

js faber-castell.fr collected 2026-10-02 12:13:32 UTC 13,613 bytes, 1 lines download raw bytes

vendor: 4,156 bytes, line 1
1"use strict";(self["FC.EcomwebpackJsonp"]=self["FC.EcomwebpackJsonp"]||[]).push([[4955,6881,5491],{41535:(e,t)=>{var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),u=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),s=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),m=Symbol.iterator;var p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},h=Object.assign,y={};function b(e,t,n){this.props=e,this.context=t,this.refs=y,this.updater=n||p}function v(){}function g(e,t,n){this.props=e,this.context=t,this.refs=y,this.updater=n||p}b.prototype.isReactComponent={},b.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},b.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},v.prototype=b.prototype;var _=g.prototype=new v;_.constructor=g,h(_,b.prototype),_.isPureReactComponent=!0;var E=Array.isArray,w=Object.prototype.hasOwnProperty,S={current:null},k={key:!0,ref:!0,__self:!0,__source:!0};function C(e,t,r){var a,o={},i=null,l=null;if(null!=t)for(a in void 0!==t.ref&&(l=t.ref),void 0!==t.key&&(i=""+t.key),t)w.call(t,a)&&!k.hasOwnProperty(a)&&(o[a]=t[a]);var u=arguments.length-2;if(1===u)o.children=r;else if(1<u){for(var c=Array(u),s=0;s<u;s++)c[s]=arguments[s+2];o.children=c}if(e&&e.defaultProps)for(a in u=e.defaultProps)void 0===o[a]&&(o[a]=u[a]);return{$$typeof:n,type:e,key:i,ref:l,props:o,_owner:S.current}}function x(e){return"object"==typeof e&&null!==e&&e.$$typeof===n}var z=/\/+/g;function I(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function N(e,t,a,o,i){var l=typeof e;"undefined"!==l&&"boolean"!==l||(e=null);var u=!1;if(null===e)u=!0;else switch(l){case"string":case"number":u=!0;break;case"object":switch(e.$$typeof){case n:case r:u=!0}}if(u)return i=i(u=e),e=""===o?"."+I(u,0):o,E(i)?(a="",null!=e&&(a=e.replace(z,"$&/")+"/"),N(i,t,a,"",(function(e){return e}))):null!=i&&(x(i)&&(i=function(e,t){return{$$typeof:n,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(i,a+(!i.key||u&&u.key===i.key?"":(""+i.key).replace(z,"$&/")+"/")+e)),t.push(i)),1;if(u=0,o=""===o?".":o+":",E(e))for(var c=0;c<e.length;c++){var s=o+I(l=e[c],c);u+=N(l,t,a,s,i)}else if(s=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=m&&e[m]||e["@@iterator"])?e:null}(e),"function"==typeof s)for(e=s.call(e),c=0;!(l=e.next()).done;)u+=N(l=l.value,t,a,s=o+I(l,c++),i);else if("object"===l)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return u}function R(e,t,n){if(null==e)return e;var r=[],a=0;return N(e,r,"","",(function(e){return t.call(n,e,a++)})),r}function W(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var L={current:null},G={transition:null},$={ReactCurrentDispatcher:L,ReactCurrentBatchConfig:G,ReactCurrentOwner:S};t.Children={map:R,forEach:function(e,t,n){R(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return R(e,(function(){t++})),t},toArray:function(e){return R(e,(function(e){return e}))||[]},only:function(e){if(!x(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=b,t.Fragment=a,t.Profiler=i,t.PureComponent=g,t.StrictMode=o,t.Suspense=s,t.__SECRET_INT
1ERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=$,t.cloneElement=function(e,t,r){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var a=h({},e.props),o=e.key,i=e.ref,l=e._owner;if(null!=t){if(void 0!==t.ref&&(i=t.ref,l=S.current),void 0!==t.key&&(o=""+t.key),e.type&&e.type.defaultProps)var u=e.type.defaultProps;for(c in t)w.call(t,c)&&!k.hasOwnProperty(c)&&(a[c]=void 0===t[c]&&void 0!==u?u[c]:t[c])}var c=arguments.length-2;if(1===c)a.children=r;else if(1<c){u=Array(c);for(var s=0;s<c;s++)u[s]=arguments[s+2];a.children=u}return{$$typeof:n,type:e.type,key:o,ref:i,props:a,_owner:l}},t.createContext=function(e){return(e={$$typeof:u,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:l,_context:e},e.Consumer=e},t.createElement=C,t.createFactory=function(e){var t=C.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:c,render:e}},t.isValidElement=x,t.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:W}},t.memo=function(e,t){return{$$typeof:f,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=G.transition;G.transition={};try{e()}finally{G.transition=t}},t.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},t.useCallback=function(e,t){return L.current.useCallback(e,t)},t.useContext=function(e){return L.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return L.current.useDeferredValue(e)},t.useEffect=function(e,t){return L.current.useEffect(e,t)},t.useId=function(){return L.current.useId()},t.useImperativeHandle=function(e,t,n){return L.current.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return L.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return L.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return L.current.useMemo(e,t)},t.useReducer=function(e,t,n){return L.current.useReducer(e,t,n)},t.useRef=function(e){return L.current.useRef(e)},t.useState=function(e){return L.current.useState(e)},t.useSyncExternalStore=function(e,t,n){return L.current.useSyncExternalStore(e,t,n)},t.useTransition=function(){return L.current.useTransition()},t.version="18.2.0"},27378:(e,t,n)=>{e.exports=n(41535)},8242:(e,t,n)=>{n.r(t),n.d(t,{default:()=>i});var r=n(27378),a=n(15211),o=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,a,o=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i};const i=function(e){var t=e.dialogId,n=e.isOpen,i=e.onClose,l=e.commonTexts,u=e.options,c=e.openedWithKeyboard,s=(0,r.useRef)([]),f=(0,r.useRef)([]),d=(0,r.useRef)(null),m=o((0,r.useState)(null),2),p=m[0],h=m[1],y=o((0,r.useState)(FaberCastell.isMobile),2),b=y[0],v=y[1],g=o((0,r.useState)(FaberCastell.isDesktop),2),_=g[0],E=g[1],w=u.findIndex((function(e){return"true"===e.selected})),S=crypto.randomUUID();(0,r.useEffect)((function(){i&&-1!==w&&h(w)}),[i,u]),(0,r.useEffect)((function(){n&&c&&(-1!==w&&setTimeout((function(){var e;null===(e=f.current[w])||void 0===e||e.focus()}),0),1===u.length&&setTimeout((function(){var e;null===(e=s.current[0])||void 0===e||e.focus()}),0))}),[n,c]);var k=function(e){h((function(t){return t===e?null:e}))};(0,r.useEffect)((function(){var e=function(){v(FaberCastell.isMobile),E(FaberCastell.isDesktop)};return document.addEventListener("FaberCastell:resizeEnd",e),function(){document.removeEventListener("FaberCastell:resizeEnd",e)}}),[]);(0,r.useEffect)((function(){var e=d.current;e&&(n?e.open||e.showModal():e.open&&e.close())}),[n]),(0,r.useEffect)((function(){var e=d.current;if(e){var t=function(){return i()};return e.addEventListener("close",t),function(){return e.removeEventListener("close",t)}}}),[i]);return r.createElement("dialog",{ref:d,className:"nib-size-modal fc-modal",id:t,"aria-labelledby":"nib-size-modal-title-".concat(S),onClick:function(e){var t;e.target===d.current&&(null===(t=d.current)||void 0===t||t.close())}},r.createElement("button",{onClick:function(){var e;return null===(e=d.current)||void 0===e?void 0:e.close()},className:"modal-close","aria-label":l.cancelButtonText,type:"reset"},r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1.25rem",height:"1.25rem",viewBox:"4 4 16 16",fill:"none"},r.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.364 7.05024L16.9497 5.63603L12 10.5858L7.05025 5.63603L5.63604 7.05024L10.5858 12L5.63604 16.9497L7.05025 18.3639L12 13.4142L16.9497 18.3639L18.364 16.9497L13.4142 12L18.364 7.05024Z",fill:"currentColor"}))),r.createElement("div",{className:"nib-size-modal__wrapper"},r.createElement("h3",{id:"nib-size-modal-title-".concat(S),className:"nib-size-modal__title"},l.mainTitle),r.createElement(a.default,{showWhen:!!l.mainText},r.createElement("p",{className:"nib-size-modal__main-desc"},l.mainText)),r.createElement(a.default,{showWhen:!!l.hintText},r.createElement("p",{className:"nib-size-modal__hint-desc"},l.hintText)),r.createElement("div",{className:"nib-size-modal__accordion"},r.createElement("ul",{className:"nib-size-modal__accordion-wrapper"},u.map((function(e,t){return r.createElement(a.default,{showWhen:!!e.targetProductLink,key:t},r.createElement("li",{className:"nib-size-modal__accordion-item ".concat(p===t?"active":""),tabIndex:u.length>1?-1:0,ref:function(e){return s.current[t]=e},"data-focusable":"Enter,Space"},r.createElement("div",{className:"nib-size-modal__accordion-header",onClick:function(){return k(t)}},u.length>1?r.createElement("div",{className:"form-field radio ".concat(p===t?"active":"")},r.createElement("input",{"aria-controls":"".concat(e.title,"-accordion-").concat(S,"-segment-").concat(t),id:"".concat(e.title,"-accordion-").concat(S),ref:function(e){return f.current[t]=e},type:"radio",name:"nib-size-option",checked:p===t,onFocus:function(){return function(e,t){var n=t.current[e];p===e&&n&&!n.classList.contains("active")&&k(e)}(t,s)}}),r.createElement("label",{htmlFor:"".concat(e.title,"-accordion-").concat(S),onClick:function(){return k(t)}},r.createElement("span",{className:"hdl-5"},e.title))):r.createElement("span",{className:"hdl-5",id:"".concat(e.title,"-accordion-label")},e.title),r.createElement(a.default,{showWhen:!!e.dialogueGuide.nibSizeIdentifier},r.createElement("p",{className:"nib-size-modal__accordion-title"},"(",e.dialogueGuide.nibSizeIdentifier,")")),r.createElement("div",{className:"nib-size-modal__accordion-images"},r.createElement(a.default,{showWhen:!!e.dialogueGuide.images.previewImage.url&&_},r.createElement("img",{className:"nib-size-modal__accordion-img text",src:e.dialogueGuide.images.previewImage.url,width:e.dialogueGuide.images.previewImage.width,height:e.dialogueGuide.images.previewImage.height,alt:e.dialogueGuide.nibSizeIdentifier})),r.createElement(a.default,{showWhen:!!e.dialogueGuide.images.mainImage.url},r.createElement("img",{className:"nib-size-modal__accordion-img",src:e.dialogueGuide.images.mainImage.url,width:e.dialogueGuide.images.mainImage.width,height:e.dialogueGuide.images.mainImage.height,alt:e.dialogueGuide.nibSizeIdentifier})))),r.createElement("div",{className:"nib-size-modal__accordion-content",id:"".concat(e.title,"-accordion-").concat(S,"-segment-").concat(t)},r.createElement(a.default,{showWhen:!!l.titleWidth||!!e.dialogueGuide.textNibWidth},r.createElement("div",{className:"nib-size-modal__accordion-content-top"},r.createElement(a.default,{showWhen:!!l.titleWidth},r.createElement("h5",null,l.titleWidth)),r.createElement(a.default,{showWhen:!!e.dialogueGuide.textNibWidth},r.createElement("p",null,e.dialogueGuide.textNibWidth)))),r.createElement(a.default,{showWhen:!!l.titleStyle||!!e.dialogueGuide.textWritingStyle},r.createElement("div",{className:"nib-size-modal__accordion-content-bottom"},r.createElement(a.default,{showWhen:!!l.titleStyle},r.createElement("h5",null,l.titleStyle)),r.createElement(a.default,{showWhen:!!e.dialogueGuide.textWritingStyle},r.createElement("p",null,e.dialogueGuide.textWritingStyle)))),r.createElement(a.default,{showWhen:!!e.dialogueGuide.images.previewImage.url&&b},r.createElement("img",{className:"nib-size-modal__accordion-img",src:e.dialogueGuide.images.previewImage.url,width:e.dialogueGuide.images.previewImage.width,height:e.dialogueGuide.images.previewImage.height,alt:e.dialogueGuide.nibSizeIdentifier})))))}
1)))),r.createElement(a.default,{showWhen:u.length>1},r.createElement("div",{className:"nib-size-modal__button-wrapper"},r.createElement("button",{className:"btn btn--secondary btn--small nib-size-modal__cancel-button",type:"reset",onClick:function(){var e;return null===(e=d.current)||void 0===e?void 0:e.close()},"aria-label":l.cancelButtonText},l.cancelButtonText),r.createElement("button",{className:"btn btn--primary btn--small nib-size-modal__save-button ".concat(null===p?"disabled":""),onClick:function(e){if(e.preventDefault(),null!==p){var t=u[p];w!==p&&t.targetProductLink?window.location.href=t.targetProductLink:i()}else i()},"aria-label":l.saveButtonText},l.saveButtonText)))))}},15211:(e,t,n)=>{n.r(t),n.d(t,{default:()=>a});var r=n(27378);const a=function(e){var t=e.showWhen,n=e.children;return t?r.createElement(r.Fragment,null,n):r.createElement(r.Fragment,null)}}}]);

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.