import{O as n}from"./chunk-S3R3BYOJ-CAvrcOWG.js";import{n as t,t as u}from"./path-CGslDqBy.js";import{t as r}from"./array-C9OtkChr.js";function o(n){return n[0]}function e(n){return n[1]}function f(f,i){var l=t(!0),c=null,a=n,p=null,h=u(s);function s(n){var t,u,o,e=(n=r(n)).length,s=!1;for(null==c&&(p=a(o=h())),t=0;t<=e;++t)!(t<e&&l(u=n[t],t,n))===s&&((s=!s)?p.lineStart():p.lineEnd()),s&&p.point(+f(u,t,n),+i(u,t,n));if(o)return p=null,o+""||null}return f="function"==typeof f?f:void 0===f?o:t(f),i="function"==typeof i?i:void 0===i?e:t(i),s.x=function(n){return arguments.length?(f="function"==typeof n?n:t(+n),s):f},s.y=function(n){return arguments.length?(i="function"==typeof n?n:t(+n),s):i},s.defined=function(n){return arguments.length?(l="function"==typeof n?n:t(!!n),s):l},s.curve=function(n){return arguments.length?(a=n,null!=c&&(p=a(c)),s):a},s.context=function(n){return arguments.length?(null==n?c=p=null:p=a(c=n),s):c},s}export{f as t};