import{useRef as n}from"react";import s from"fast-deep-equal";import{safeSlugify as c}from"../../utils/string.js";function u(e){const o=e.components&&e.components.securitySchemes||{};for(const r of Object.keys(o)){const t=o[r];t["x-type"]&&(t.type=t["x-type"]),t["x-scheme"]&&(t.scheme=t["x-scheme"])}}function x(e){const o=n(null),r=n(0);return s(e,o.current)||(o.current=e,r.current+=1),[r.current]}function f(e){if(typeof e[0]=="string")return`section/${c(e[0])}`;if(e.children)return f(e[0])}export{u as fixSpec,f as getMarkdownHeaderId,x as useDeepCompareMemoize};
