/** * @name string-collapse-leading-whitespace * @fileoverview Collapse the leading and trailing whitespace of a string * @version 5.1.0 * @author Roy Revelt, Codsen Ltd * @license MIT * {@link https://codsen.com/os/string-collapse-leading-whitespace/} */ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).stringCollapseLeadingWhitespace={})}(this,(function(e){"use strict";e.collWhitespace=function(e,t=1){function i(e){return Array.from(e).reverse().join("")}function r(e,t,i){const r=i?"\n":"\r",n=i?"\r":"\n";if(!e)return e;let f=0,o="";for(let i=0,l=e.length;i=0&&(n=+t);let f="",o="";if(e.trim()){if(!e[0].trim())for(let t=0,i=e.length;t